0

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 :)

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by jamello
1

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;
Votes + Comments
solved
0

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!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.