Hello experts!
Please how do I display markup text (in html) with a asp.net 3.0 server control? I have a database full of markup text inputted using a richtext control. but I will like to display these text using other asp.net controls that would render the text correctly with the markup applied.
Expecting to hear from you guys.
Thanks
peace :)

Two ways:

string markup = "<a href='a.aspx'/>";
 Label1.Text = Server.HtmlEncode( markup);
string markup = "<a href='a.aspx'/>";
Literal1.Mode = LiteralMode.Encode;
Literal1.Text = markup;
commented: solved +6

Thanks for the prompt reply adatapost.
I tried your suggestion but it did not work. The codes were still showing the html tags raw "as is".
Other ideas are still welcome
thanks once again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.