Last post Apr 22, 2014 12:29 AM by chetan.sarode
Apr 20, 2014 04:46 PM|GIDLIBRARY|LINK
I have a form where has a textbox with an htmlEditorExtender. It works. He can format his own content, or he can paste in entire webpages from elsewhere in the web. In source view, he sees the tags, and in regular view he sees the formatted text.
I have another page where I want to let the user edit this text, if he wants to update it. Again, I use a textbox with an htmleditorextender.
The problem is, that when I get his original markup from a database and put it into the textbox, that original markup gets encoded. so for instance, a '<' character becomes <
I think this is a bug.
If a textbox has an htmleditorextender attached to it, then it should accept markup, and not try to encode it.
But since the problem exists, is there anyway, perhaps in the 'load' event of the textbox, to decode the text coming in?
Apr 21, 2014 05:22 AM|Happy Chen - MSFT|LINK
Workaround: When you get the text out of the editor, use HtmlDecode to convert it: String fixedText = HttpUtility.HtmlDecode(txtBody.Text);
please refer to the link for more information:
HtmlEditorExtender encoding HTML in postback when using LoadControl()
Hope it helps you.
Apr 22, 2014 12:29 AM|chetan.sarode|LINK
Refer this threads -