ASP.NET Style Attribute
Definition and Usage
The Style attribute is used to set or return inline CSS styles for the control.
Syntax
<asp:webcontrol id="id" Style="style" runat="server" />
Value | Description |
---|---|
style | String, the value of which is the CSS style specified for the inline style sheet. |
Example
This example sets the CSS style of the button control:
<form runat="server"> <asp:Button id="Button" Text="Submit" runat="server" Style="font: 12pt Verdana; font-weight: 700; color: orange;" /> </form>
Example
- Add styles to button controls using the style attribute