Hi guys,

I am trying to create a html table through c sharp. I opened a new web application and typed the following in default.aspx.cs file


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Drawing.Text;


namespace TablePOC
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Table tbl = new Table();
tbl.ID = "table1";
tbl.BorderStyle = BorderStyle.Dotted;
tbl.GridLines = GridLines.Both;
this.Controls.Add(tbl);


TableRow rw1 = new TableRow();
TableCell cell1 = new TableCell();
cell1.Width = 450;

Label text1 = new Label();
text1.Text = "there are large number of people who were trapped in the avalanche ";
cell1.Controls.Add(text1);
rw1.Cells.Add(cell1);
tbl.Controls.Add(rw1);



TableRow rw2 = new TableRow();
TableCell cell2 = new TableCell();
cell2.Width = 450;
Label text2 = new Label();
text2.Text = "the blue wild fox jumped over the fence and ran away never to return again ";
cell2.Controls.Add(text2);
rw2.Cells.Add(cell2);
tbl.Controls.Add(rw2);

}
}
}

my requirement is that I want each cell of the table to have 3 different colors. I have added 2 cells in 2 rows in d above code. Its easy to add 1 color as background color for a cell. But, I want to add 3 colors as background color for the cell such that, if the cell is say 100px width, the first 30px of the cell should be green, the second 30px should be yellow and the last 40px should be pink. Can anybody help me in dis ? Thanks in advance