Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Special Characters and TEXTBOX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dotnettester - 22 Jul 2005 16:45 GMT
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,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.