Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

i need to underline the text of the label control programmatically at runtime. How can i achieve the same.

Thanks

Varun Sareen
Posted

set the label text dynamically, use below code and change this into your format.

lbl.Text = "Help Desk";
 
Share this answer
 
hi try this

C#
labelID.Style.Add("text-decoration", "underline");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900