ASP.NET ForeColor Property
Definition and Usage
The ForeColor property is used to set or return the control's foreground color (usually the text color).
Syntax
<asp:webcontrol id="id" ForeColor="color" runat="server" />
Property | Description |
---|---|
color | Set the color for the control's foreground color. It must be a valid HTML Ranci. |
Example
The following example sets the button's foreground color:
<form runat="server"> <asp:Button id="button1" Text="Submit" ForeColor="#FF0000" runat="server" /> </form>
Example
- Set Button Kontrol's ForeColor
- Set Button Kontrol's ForeColor (with declaration and script)