In this article we will cover how to resolve Error "A potentially dangerous Request.Form value was detected from the client in asp.net 4.0"
Web.config
Add below mentioned code int Web.config file.
<system.web> <httpRuntime requestValidationMode="2.0" /> </system.web>
To resolve the issue on all pages add below code to the Web.config inside <system.web>
<pages validateRequest="false"></pages>
To Resolve the issue on specific page add ValidateRequest="false" to Page directory as shown below.
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="Aboutus.aspx.cs" Inherits="Aboutus" ValidateRequest="false" %>
Post Comments(0)