A potentially dangerous Request.Form value was detected from the client..« View all ASP.net articles
November 11, 2006

This error is caused by trying to insert text that resembles HTML into a texbox. This is set by default to disallow users trying to insert HTML or harmful script into a form.
For more information read "Request Validation - Preventing Script Attacks" article on the Microsoft ASP.net website: http://www.asp.net/faq/RequestValidation.aspx
Solution
Disable request validation on the aspx page:
validateRequest="false"
Example
Current page
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="myPage.aspx.vb" Inherits="myProject.myPage" %>
Updated page
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="myPage.aspx.vb" Inherits="myProject.myPage" validateRequest="false"%>
Global setting
You may also set this globally on your website in the web.config file within the <system.web> section: <pages validateRequest="false" />
|