System.Web.HttpRequestValidationException

  • Thread starter Thread starter Shail
  • Start date Start date
S

Shail

I receive this exception while debugging:
System.Web.HttpRequestValidationException

saying that
A potentially dangerous Request.Form value was detected
from the client (qtb="... #include <iostream.h> main
()...").

I want to override set the validateRequest=false for a
specific page, how to do it?
 
You put it in the <%@Page %>

ie...

<%@ Page language="c#" Codebehind="Edit.aspx.cs"
AutoEventWireup="false" Inherits="Edit" validateRequest=false %>

Note this will only work with version 1.1 of the Framework. if you
use this command with version 1.0 it will thrown an exception saying
that validateRequest is an unknown attribute. This can be a real
pain, it would be nice for the runtime to just ignore it but...

Good Luck
MK
 
Back
Top