ASP.NET CssClassProperty
Web Control Standard Property Reference Manual
Definition and Usage
The CssClass property is used to set or return the CSS style class for a control.
Syntax
<asp:webcontrol id="id" CssClass="style" runat="server" />
| Property | Description |
|---|---|
| style | A string value that specifies the CSS class to use on the control. |
Example
The following example sets the CSS style for a 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>
.TestStyle
{
font: 12pt verdana;
font-weight:700;
color:orange;
}
</style>
<form runat="server">
<asp:Button id="Button" CssClass="TestStyle"
Text="Submit" runat="server"/>
</form>
Show Example »
Web Control Standard Property Reference Manual Other Extensions