Special Characters and TEXTBOX

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box and I want to let the users insert HTML Tags in the tags.
It does not work and breaks if there are any HTML Tags inside the text.
Is there any way I can enable HTML tags to be part of the input text?

Thanks,
 
Set the ValidateRequest attribute of the @Page directive to false. To do it
at the application level, set the same attribute to false in the web.config
file.

....
<system.web>
<pages validateRequest="false" />
</system.web>
....

Just make sure you properly HTML-encode/decode the textbox content in the
code-behind.

I have a text box and I want to let the users insert HTML Tags in the tags.
It does not work and breaks if there are any HTML Tags inside the text.
Is there any way I can enable HTML tags to be part of the input text?

Thanks,
 
"It does not work" the characters are stored? they are badly stored? You
get an error?

Assuming you get an error, check out:
http://weblogs.asp.net/pwilson/archive/2003/05/05/6480.aspx

ASP.Net 1.1 has a ValidateRequest field, turned on by default, which won't
allow potentially dangerous user input...simply turn it off.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
Back
Top