Hey guys,
How do you set the forecolor of a label progmatically???
anuj_sharma
-3
Junior Poster
Recommended Answers
Jump to PostFor an ASP label in c# code?
Drop a label in the designer:
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
Assign a forecolor in code:
protected void Page_Load(object sender, EventArgs e) { Label1.ForeColor = System.Drawing.Color.Red; }
All 4 Replies
sknake
1,622
Senior Poster
Featured Poster
anuj_sharma
-3
Junior Poster
chithrasujith
0
Newbie Poster
mail2ranjan
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.