Solved

HTMLeditorextender encoding html during postback

Posted on 2013-05-23
4
1,576 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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