Sponsored By
MindStick SurveyManager
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
   

Home >> .Net >> ASP.Net >> using script tag in textbox.
Author Post

Somesh


Total Post: 21
Member Since: 10/26/2010
Points: 107
using script tag in textbox.
Posted On: 8/24/2011 1:00:46 AM
hi,
problem in using script tag (or other html tag) in textbox and submit the page it gives the error as

A potentially dangerous Request.Form value was detected from the client (TextBox1="<script>").

how to solve this problem
give the solution of its
thanks,
Author Post

Rohit Kesharwani


Total Post: 54
Member Since: 8/8/2011
Points: 385
Re: using script tag in textbox.
Posted On: 8/24/2011 1:06:49 AM

If you are using vs 2008:

write ValidateRequest="False" in the page directive.

For vs 2010:
                   
write ValidateRequest="False" in the page directive,
and in web.config file
 <system.web>
<httpRuntime requestValidationMode="2.0"/>
</system.web>

 

 

Author Post

Amit Singh


Total Post: 104
Member Since: 8/8/2010
Points: 702
Re: using script tag in textbox.
Posted On: 8/24/2011 6:28:36 AM

Hi somesh

You can resolve this problem by using javascript escape function for textbox value then submit this value

Report Abuse Form
Reason:    
 
Total Online Users: 2461
Advertisement
MindStick DataConverter
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.