I have a text editer, after applying format to the text I display the text when a button is clicked. I want the text to be displayed with all the formatting applied in the text editor.
lbl_Subject.Text = Server.HtmlEncode(formattedtext);
but it is not displayed in the format applied instead it is displayed as
<p> This is Para 1</p> <p> this is Para 2</p> <p> <strong>this is bold</strong></p>
how can I display the text with all the format applied in text editor
Update i tried with literal
the result is
<p> This is Para 1</p> <p> this is Para 2</p> <p> <strong>this is bold</strong></p>
use div instead of label.
div1.InnerHtml=formattedtext;
HtmlEncode makes sure that text is displayed correctly in the browser and not interpreted by the browser as HTML.
Try removing HtmlEncode or using HtmlDecode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With