HTMLeditorextender encoding html during postback

Hi ,
I have an HTMLEditorExtender control in my page. But during postbacks, whatever the formatting and image, it encodes as HTML.
But I succeed half  in giving the following in prerender event
txtEmailBody.Text = HttpUtility.HtmlDecode(txtEmailBody.Text);
But the image I uploaded as a preview, did not get decoded.

Any Help?
niyasfairoseAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Kumaraswamy RConnect With a Mentor Commented:
if (IsPostBack)
 {
txtEmailBody.Text = Server.HtmlDecode(txtEmailBody.Text);
}
0
 
niyasfairoseAuthor Commented:
I tried both
Server.HtmlDecode(txtEmailBody.Text);
and
HttpUtility.HtmlDecode(txtEmailBody.Text);

but the image is not decoded yet
0
 
Kumaraswamy RCommented:
If you want to produce an image tag with an incorrectly encoded url.
 you have to write the html code yourself.
0
 
niyasfairoseAuthor Commented:
Sorry, the actual thing is , the image is decoded but the image preview in Htmleditorextender is gone. How to set the image preview again in htmleditorextender
0
All Courses

From novice to tech pro — start learning today.