TextBox1.ForeColor = Color.Red;
TextBox1.Font.Bold = True;
Or this can be done using a CssClass (recommended):
.highlight
{
color:red;
font-weight:bold;
}
codebehind
TextBox1.CssClass = "highlight";
or,Design source
<asp:TextBox id="TextBox1" runat="server" CssClass="highlight"></asp:TextBox>
Or the styles can be added inline:
TextBox1.Attributes["style"] = "color:red; font-weight:bold;";
No comments:
Post a Comment
If any doubt?then please comment in my post