Display html code content as a normal text

asp.net , db Hong Kong SAR
  • 13 years ago

     I m having sone content in my database in the HTML format....Like "Hi <b>flower <i>how <u>RE U</u></i></b><br />"

    WHAT I WANT NOW IS I WANT TO DISPLAY THE CONTENT AS PER THE hTML FORMAT.... M using ASP.NET 2.0 n db Sql server2000..

    Thamks in advance


     

  • 13 years ago

    Hi there,

    You can show your content with a lable. Lable control can show html code, or you can use a div control and set innerHTML property like bellow:

    <div id="divMessage" runat="server">
    </div>

    divMessage.innerHTML = "Hi <b>flower <i>how <u>RE U</u></i></b><br />"

  • 13 years ago

     Thanks Mehdi

         But myself used the label control...Thanks....
     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”