Run the html code which entered in textbox
i am having 1 txtbox, where i am entering html code, and display in new page, but it display the code itself, but i need the code to run and display the output in the new page.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Posted Sep 15, 2011, 10:26 PM EDT
window.open('url to open','window name','attribute1,attribute2')
chitra33 reputationPosted Sep 15, 2011, 10:37 PM EDT
Posted Sep 15, 2011, 10:53 PM EDT
Satish BhatRank #2,496 · 563 reputationPosted Sep 15, 2011, 10:58 PM EDT
If you want to change this behaviour, you will need to inherit from Textbox and override the Text property. It currently has the attribute PersistenceMode.EncodedInnerDefaultProperty. I think you have to change it to PersistenceMode.InnerDefaultProperty.
But the simplest way is to use Server.HtmlDecode(). But be careful of Cross-site scripting (XSS) attacks.