Solved

HTMLeditorextender encoding html during postback

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ajax and PHP 9 53
asp web application 3 43
ASP.NET Complete Life Cycle for all the controls 2 22
Send parameters via datatable ajax call 4 12
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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