Link to home
Start Free TrialLog in
Avatar of kwh3856
kwh3856Flag for United States of America

asked on

How do you turn off BOLD in an HTML tag?

I am writing a C#.net / ASP.net application.  In my code I load a variable with text data.  This variable is then assigned to an HTML editor that presents the data to the users.  In the textual contents of the variable, I am using HTML tags to bold data.  My problem is the bold does not turn off.  Can someone point me in the right direction to solve this problem?


Here is my code:
notice the <b>Medications<br /> .....this is where I start the bolding.  I want it to stop after the s in Medications.  I have also tried <b>Medications<b><br /> but that did not work either.
// Concantenate Rx Array
                int rxindex;
                MyGlobalVars.RxConCat = "<b>Medications<br />";
                for (rxindex = 0; rxindex < MyGlobalVars.RxCount; rxindex++)
                {
                    MyGlobalVars.RxConCat = string.Format("{0}<br />{1}<br />", MyGlobalVars.RxConCat, MyGlobalVars.Rx[rxindex]);
                }

Open in new window

Avatar of Kalpesh Chhatrala
Kalpesh Chhatrala
Flag of India image

Bold Start Tag <b>

Bold Stop Tag </b>
ASKER CERTIFIED SOLUTION
Avatar of Kalpesh Chhatrala
Kalpesh Chhatrala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try code as provide below, after Medications have added </b> tag to end representing text as bold in HTML.

// Concantenate Rx Array
                int rxindex;
                MyGlobalVars.RxConCat = "<b>Medications</b><br />";
                for (rxindex = 0; rxindex < MyGlobalVars.RxCount; rxindex++)
                {
                    MyGlobalVars.RxConCat = string.Format("{0}<br />{1}<br />", MyGlobalVars.RxConCat, MyGlobalVars.Rx[rxindex]);
                }
Avatar of kwh3856

ASKER

Thank you.  That was exactly what I needed.
Please ignore code submitted by me @pateljitu and refer@kalpesh2804 code.