SolutionCottage.com
Posted  19 Mar 2009 - 10:19:20

Category: ASP.net


A potentially dangerous Request.Form value was detected

Issue:
When you submit your form, you get the error message "A potentially dangerous Request.Form value was detected from the client".

Solution:
You probably entered a combination of symbols, like a script or some other stuff. You have two options here, you can set "ValidateRequest" to false in your page definition where the form resides. Alternatively, and better yet, use the HttpUtility.HtmlEncode() function on your fields when submitting them. This is usually done by a function tied to the click of the submit button. Then the script or any "dangerous" sequences should be taken care of.








0 comments:








© SolutionCottage 2008-2011 9/26/2017 10:11:37 AM