Solved

How do you turn off BOLD in an HTML tag?

Posted on 2011-02-26
5
609 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:kwh3856
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34990215
Bold Start Tag <b>

Bold Stop Tag </b>
0
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 500 total points
ID: 34990218
// 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]);
                }

Open in new window

0
 
LVL 15

Expert Comment

by:pateljitu
ID: 34990224
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]);
                }
0
 

Author Closing Comment

by:kwh3856
ID: 34990226
Thank you.  That was exactly what I needed.
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 34990230
Please ignore code submitted by me @pateljitu and refer@kalpesh2804 code.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
orderby list (from Json) 1 32
Table doesn't show the lines! 3 25
How do I add counter to html listbox using jquery 2 27
Can't get video to center on page 2 17
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question