1

I am making an alert using ASP.NET and C# and I would like to change the CSS styling of an ASP.Net element based on the the type of message am passing to the element e.g green label for positive alert or red label for negative alert.

ive using tried Label1.Style.add() with not success

Sibusiso Shongwe
  • 176
  • 1
  • 2
  • 21

1 Answers1

0
Label1.Stye.Add("color", "red") 

The first parameter being the css attribute you want to add, and the second being its value.

Sibusiso Shongwe
  • 176
  • 1
  • 2
  • 21