Solved

HTMLeditorextender encoding html during postback

Posted on 2013-05-23
4
1,595 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

729 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