Solved

How do you turn off BOLD in an HTML tag?

Posted on 2011-02-26
5
619 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 …

688 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