ASP.NET + ListView + if statment, change style

  • Thread starter Thread starter Izi
  • Start date Start date

Izi

Izi

Soldato
Joined
9 Dec 2007
Posts
2,718
Hi,

I have a listview, which is databound to a SQL data source.

I want to, depending on the retunred value of the SQL statment, change the colour of the TR row in my Item Template.

IE....
<ItemTemplate>
<tr>
<td>CHANGE THE BACKGROUN COLOUR HERE DEPENDING ON USER TYPE</td>
</td>
</ItemTemplate>

So my SQL statment pulls users from the DB. If they are Admin I want the background of the tr red, otherwise green.

Thanks for your help.
 
Back
Top Bottom