Reputation: 2832
Suppose i'm having <div> tag with id="toggleText" & runat="Server"
then i can change style attributes by using following -
toggleText.Style.Add("Display", "block");
But if i want to retrieve the style attribute then how to do this?
thanks
Upvotes: 1
Views: 583
Reputation: 73253
When you query the control's Style property you get "a collection of all cascading style sheet (CSS) properties applied to a specified HTML server control in the ASP.NET file" - there's a code sample on that page as well.
Upvotes: 1