?
Solved

HTMLeditorextender encoding html during postback

Posted on 2013-05-23
4
Medium Priority
?
1,612 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article discusses how to implement server side field validation and display customized error messages to the client.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 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