Thursday, September 27, 2012

A potentially dangerous Request.Form value - Error


If  we try to insert some html formatted data in
database using richtextbox / textbox(multiline) we will get error like "A potentially dangerous
Request.Form value was detected from the client in ASP.NET WebForms"....


Then we can follow like below .aspx
ValidateRequest="false"  //in page directive(<%@ Page %>) (or)

Web.Config
<httpRuntime requestValidationMode="2.0"/>  //web.config
But if there is no httpRuntime section in the web.config file, then it should inside the <system.web> section.




No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software