Reputation: 5315
in the textbox when we pass the text within "< >" bracket then it shows the error like A potentially dangerous Request.Form value was detected from the client (grouplink$txtAddPerson="
Upvotes: 0
Views: 216
Reputation: 712
This is a security feature in asp.net. This is to prevent hacking from the textbox/area. The hacker can enter HTML/Script tags inside the textbox and pass to server and get/destroy any data..
You can avoid this feature by disabling through web.config; but I suggest to leave it as it is, as it would be vulnerable to attacks.
EDIT:
Please visit for more clarity: http://www.beansoftware.com/ASP.NET-FAQ/Allow-HTML-Tags.aspx
Don't make change in web.config as all the pages will be vulnerable. Suggested way is to use it in the Page directive as specified in the link.
Upvotes: 1
Reputation: 3183
You can disable it for a single page;
<%@ Page validateRequest="false" %>
Or using the web.config for all pages
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
You might want to HtmlEncode your input to keep you safe from Scriptinserts
Upvotes: 1