How can I bold my output like this
Student "John" assigned to Officer "Mick".
i want John and Mick bold in web
This is my code aspx :
this.lblAssignee.Text = " Student \"" + StudentAssign + "\" assigned to Officer \"" + objAssign.FullName + "\".";
How can I bold my output like this
Student "John" assigned to Officer "Mick".
i want John and Mick bold in web
This is my code aspx :
this.lblAssignee.Text = " Student \"" + StudentAssign + "\" assigned to Officer \"" + objAssign.FullName + "\".";
Try this
this.lblAssignee.Text = " Student \"<b>" + StudentAssign + "</b>\" assigned to Officer \"<b>" + objAssign.FullName + "</b>\".";
or this (better maintainability)
this.lblAssignee.Text = " Student \"<span class='highlight'>" + StudentAssign + "</span>\" assigned to Officer \"<span class='highlight'>" + objAssign.FullName + "</span>\".";
and in your stylesheet
.highlight { font-weight: bold; }
Another option would be setting the Font.Bold property of the label to True.
Something like:
myLabel.Font.Bold = True
Assuming you can use several labels of course.