I want to disable RequestValidation in a specific view in RTM version of MVC 2.0 . therefore, I added some necessary directives for viewing the section of the page, as shown below:
<%@ Page ValidateRequest="false" Language="C#" MasterPageFile="Path" Inherits="System.Web.Mvc.ViewPage<Path>" %>
but RequestValidation is not disabled! I also added the RequestValidation attribute for the corresponding action in the controller, as shown below:
[System.Web.Mvc.ValidateInput(false)] public System.Web.Mvc.ActionResult Create(Model instance) {
: '), but RequestValidation is not disabled either!
in a previous attempt, set RequestValidation to false in the Web.config file, as shown below:
<pages validateRequest="false" />
RequestValidation is still not disconnecting!
Why? thanks in advance;)
Sadgh
source share