Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent: ASP.NET TableCell BackColor 2

Status
Not open for further replies.

cyberdeminout

Programmer
Jul 19, 2005
37
US
Hi,

In .vb file,
Can anyone help me how to set backcolor of table cell in hex format(#ECECEC).

The following is one way to set backcolor in asp.net(vb) file.
tbCell.BackColor = Color.Red

In aspx page we can directly write <asp:tablecell backcolor="#3435343"/>


Please help me. thanks in advance.
Ram

 
why are u looking for another way to set bgcolor?

Known is handfull, Unknown is worldfull
 
You could use Attributes.Add to add the color e.g.
Code:
tbCell.Attributes.Add("backcolor","#ECECEC")
or, you could use Color.FromArgb and pass the RGB colors.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Wow, it's been a long time since I've been to these forums!

Anyhoo, try ColorTranslator.FromHtml("#ECECEC") which will return you a Color object

Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Hi vbcris,

actually am creating cells at runtime.

I appreciate all of you.
my thanks to HellTell and ca8msm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top