Ram Ram - 1 year ago 153
ASP.NET (C#) Question

How to make string bold in code behind

Is there a way to make a string bolder in code behind using C# .NET?

I tried:

string TypeofDay = "<span style='font-weight: bold'>Type Of Day</span> ";
txtbox.Text = TypeofDay + ": " + "Delivery Day"

I am concatenating TypeofDay(bold) and "Delivery Day" to display in a textbox.

hvd hvd
Answer Source

PS. I am concatenating few bold strings and some other strings to display in a textbox.

A HTML text box does not support this. ASP.NET (usually) generates HTML; if HTML does not support this, you cannot solve it from the server side.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download