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,
Siva M - 22 Jul 2005 17:00 GMT
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,
Karl Seguin - 22 Jul 2005 17:11 GMT
"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

Signature
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!)
>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,
dotnettester - 22 Jul 2005 22:00 GMT
Thank u both
> 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,