What is the difference between CSSClass and class property of controls?

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

Both are used for applying css classes to the controls but there is only one difference between both.
As we can write either CSSClass or class property for server side controls i.e. Asp.net controls but only use class property for HTML control.

For Example:-
<input type="button" id="btn1" value="Click Me" class="font_bold"/>        

<asp:Button ID="btn2" runat="server" Text="Click Me" class="font_bold"/>
<asp:Button ID="btn3" runat="server" Text="Click Me" CssClass="font_bold"/>

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response