Click here to Skip to main content
15,918,211 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to handle when User inter Tag of Html into Textbox for example Insert br <br/>
asp.net show Error.
how to Handle it?
Posted
Updated 26-Sep-12 4:54am
v2

1 solution

Put ValidateRequest="false" in your page, like ...

"<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile..."

This will prevent throwing error. But this also open an opportunity for an attacker to inject script in you application, so you should also use Server.HtmlEncode() to protect your page

Hope this will help you
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900