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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: ASP.NET Web Forms |
Control: Grid


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





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


           “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.   






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




2X faster development

The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
You must log in to leave a comment
Jul 24, 2019

This is not a valid solution! Data should be handled in an other way, it should not activate the request validation. It's not a recommended solution to turn off request validation. This is a bug!


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile