How to apply CSS class dynamically?

 Posted by vishalneeraj-24503 on 5/5/2014 | Category: ASP.NET Interview questions | Views: 1199 | Points: 40

With the help of Control'Style property,we can apply css at run-time,suppose i want to set Body background color,then we will write as:-
<body id="bdy" runat="server">

Then on code behind,
bdy.Style["Background-Color"] = LightYellow;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response