System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client

27. February 2013

This error comes when you try to get user input in raw html through a textbox control in order to resolve this you will have to include ValidateRequest="false"


<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile="" AutoEventWireup="true" CodeBehind="" Inherits="" %>

and also you will have to include this

<compilation debug="true" targetFramework="4.0" />
<httpRuntime requestValidationMode="2.0"/>

in your web.config file