C# .NET - making the text bold in c# - Asked By karur krishna madhu on 20-Aug-13 04:36 AM

   "<b>Currentstatus:</b>"+" "+" "+ lblStatus.Text + "" + Environment.NewLine +
                                   "Comments Log :" + " " + " " + lblLog.Text + "" + Environment.NewLine +

i want to make current status and comments log in bold with a fixed font of 10 how to do that?i have nearly 70 fields like current status and comments log
Robbe Morris replied to karur krishna madhu on 20-Aug-13 06:26 AM
Is this an ASP.NET TextBox or Windows Forms .NET?

You've already got the B or bold tag around current status which is right for html.  You've also got the Environment.NewLine but that isn't correct for html.
karur krishna madhu replied to Robbe Morris on 20-Aug-13 07:00 AM
this is part of asp.net app and i am generating this content as part of word doc using c# code. and i need break after each line for that i used env.newline. but <b></b> is not working as part of c# code. i think it will work only as part of html. what should i do to have fonts and bold work as part of c# code? do i need to use font class?if so i have nearly 90 + fields like this 
Robbe Morris replied to karur krishna madhu on 20-Aug-13 10:27 AM
Microsoft Word can import html but the rendering is not always accurate.  Microsoft Word will not see the B tag and automatically work for you.  Ideally, you'd want to get a component that is threadsafe (Microsoft Office isn't) and works well in a web/ASP.NET environment.  Aspose has one.  So does Syncfusion.

Microsoft Word has proprietary formats.