Set color of text in a Textbox/Label to Red and make it bold in asp.net C#
TextBox1.ForeColor = Color.Red;
TextBox1.Font.Bold = True;
Or this can be done using a CssClass (recommended):
.highlight
{
color:red;
font-weight:bold;
}
TextBox1.CssClass = "highlight";
Or the styles can be added inline:
TextBox1.Attributes["style"] = "color:red; font-weight:bold;";
Try using the property ForeColor. Like this :
TextBox1.ForeColor = Color.Red;