kwh3856
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.
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]);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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]);
}
// 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]);
}
ASKER
Thank you. That was exactly what I needed.
Please ignore code submitted by me @pateljitu and refer@kalpesh2804 code.
Bold Stop Tag </b>