Ram Ram - 1 month ago 20
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

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.

Comments