Special Characters and TEXTBOX

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,
 
S

Siva M

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,
 
K

Karl Seguin

"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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top