Solved

HTMLeditorextender encoding html during postback

Posted on 2013-05-23
4
1,544 Views
Last Modified: 2013-05-25
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?
0
Comment
Question by:niyasfairose
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 39190193
if (IsPostBack)
 {
txtEmailBody.Text = Server.HtmlDecode(txtEmailBody.Text);
}
0
 

Author Comment

by:niyasfairose
ID: 39190388
I tried both
Server.HtmlDecode(txtEmailBody.Text);
and
HttpUtility.HtmlDecode(txtEmailBody.Text);

but the image is not decoded yet
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 39190421
If you want to produce an image tag with an incorrectly encoded url.
 you have to write the html code yourself.
0
 

Author Comment

by:niyasfairose
ID: 39190834
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now