?
Solved

How do you turn off BOLD in an HTML tag?

Posted on 2011-02-26
5
Medium Priority
?
627 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 2000 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

800 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