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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

td bgcolor based on variable

Status
Not open for further replies.

jeh3404

Programmer
Mar 24, 2000
11
0
0
US
Hello, I am fairly new at ASP.Net and I am using 2.0. I am populating a table from a SQL query. If the field is blank/null, I would like to color the background yellow in the <td>. How do I test for the variable and make this happen?

Thanks for your help.

Jim
 
Rather than use a Table, consider using a GridView. You can then use the RowDataBound event to do any conditional formatting such as setting the background color.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top