Solved

How do you turn off BOLD in an HTML tag?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
c# code 19 61
Data Saving 5 40
Convert to Hour/minute textbox and compare 3 36
Bootstrap Columns not Side-by-Side 3 16
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now