ValidateRequest = False but in action it's still True and ignored that?
Posted
by Sadegh
on Stack Overflow
See other posts from Stack Overflow
or by Sadegh
Published on 2010-04-23T13:00:47Z
Indexed on
2010/04/23
13:03 UTC
Read the original article
Hit count: 227
asp.net-mvc
|form-validation
hi guy's, i want disable RequestValidation on particular view in ASP.NET MVC 2.0 RTM. so i added some necessary to view Page directive section as below:
<%@ Page ValidateRequest="false" Language="C#" MasterPageFile="Path" Inherits="System.Web.Mvc.ViewPage<Path>" %>
but RequestValidation isn't Disabled! i also added RequestValidation Attribute to related action in controller as below:
[System.Web.Mvc.ValidateInput(false)]
public System.Web.Mvc.ActionResult Create(Model instance)
{
//Do here something
}
:') but RequestValidation isn't Disabled too!
in last try i set RequestValidation to false in Web.config file as below:
<pages validateRequest="false" />
RequestValidation still isn't turned off!
Why? thank's in advance ;)
© Stack Overflow or respective owner