How to display the part of a string underlined by an asp.net label control?
4 answers
Although a bit hacky, you can assign HTML markup to the Label Text property. Something like this should be sufficient:
Label.Text = "this is an <span class='underlineIt'>underlined expression</span>";
This class assigns the underlineIt
words "underlined expression" to the class . Within the underlineIt CSS class, you can set a rule text-decoration: underline
.
+1
source to share