We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to prevent the Exception "A potentially dangerous Request.Form value was detected from the clientside" when Template column is used.

Problem

Exception will be thrown while trying to save the record with template column. Refer the below screenshot for the error

 

 

 

Cause

           Template column is not properly initialized or template column is validated by master page while updating a record.

Solution

           “A Potential dangerous Request” exception error can be over come by defining the validateRequest property of Pages as false and requestValidationMode as “2.0” (of httpRunTime) in the  WebConfig file. Refer the below code

 

 

Please refer to the below online links where this query has been discussed.   

  

http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client 

    

http://stackoverflow.com/questions/5942300/a-potentially-dangerous-request-form-value-was-detected-from-the-client?rq=1 

 

Or you can define the ID of the script tag in the Template property of Column instead of directly defining the html elements in it. Refer the below codes

 

   

           

Article ID: Published Date: Last Revised Date: Platform: Control:
9213 08/27/2018 08/27/2018 ASP.NET Web Forms Grid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.