ASP.NET CssClass Property
Definition and Usage
CssClass is used to set or return the CSS style class of the control.
Syntax
<asp:webcontrol id="id" CssClass="style" runat="server" />
Property | Description |
---|---|
style | String value. Specifies the CSS class to be used on the control. |
Example
The following example sets CSS styles for the button:
<style> .TestStyle { font: 12pt verdana; font-weight:700; color:orange; } </style> <form runat="server"> <asp:Button id="Button" CssClass="TestStyle" Text="Submit" runat="server"/> </form>
Example
- Use CssClass to Style a Button