All Type Coding

Search Here

A potentially dangerous Request.Form value was detected from the client/A potentially dangerous Request.Form value was detected" when updating content with HTML tags


Here are possible solution which may help you. Make server side configuration setting for this. If you want to allow HTML element as input from selected pages in your project than you set this page attribute.

<%@ Page ValidateRequest="false" %>

This ValidateRequest="false" on each page. If you want in all pages in you project than make changes in Web.Config file. Add this tag In section.

If you are using .Net 4.0 than you have to make one more change in Web.Config file. Add this tag In section.

<httpRuntime requestValidationMode="2.0" />

Here are configuration for do not validate request for all pages in .Net 4.0

<configuration>
  <system.web>
     <httpRuntime requestValidationMode="2.0" />
    <pages enableSessionState="true" validateRequest="false"/>
  </system.web> 
</configuration>


No comments :

Post a Comment