To disable request validation on a page you must set the
validateRequest
attribute of the Page directive to false. The developer has to ensure that the content is properly encoded.One more way to disable it is by web.config. You have to set
<configuration>
<system.web>
<pages validaterequest="false">
</pages>
</system.web>
</configuration>
The HTML content can be encoded/decoded using the Server.HtmlEncode(string)/Server.HtmlDecode(string) functions.
This comment has been removed by a blog administrator.
ReplyDeleteThe request validation function of ASP.NET which, by standard, stops the handling of unencoded HTML material posted to the hosting server.
ReplyDelete