By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,338 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,338 IT Pros & Developers. It's quick & easy.

Special Characters and TEXTBOX

P: n/a
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,
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
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.

"dotnettester" <do**********@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
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,
Nov 19 '05 #2

P: n/a
"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/archi...5/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!)
"dotnettester" <do**********@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
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,

Nov 19 '05 #3

P: n/a
Thank u both

"dotnettester" wrote:
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,

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.