I have a nested user control which appears on every single page. It contains some validation in the form of ASP.NET validators.
The problem I'm running into is, since it's on every page (in essence it's located in my left navigation control), I need to set CausesValidation="false"
on every single button etc..
Is there a way to set CausesValidation="false" at the Page Level?
To disable client-side validation, set the page's ClientTarget property to 'Downlevel' ('Uplevel' forces client-side validation). Alternatively, you can set an individual validator control's EnableClientScript property to 'false' to disable client-side validation for that specific control.
Event Validation is a new feature in ASP.NET 2.0 which provides an additional level of checks on postback actions. It verifies whether a postback from a control on client-side is really from that control and not from a malicious person trying to break your application.
Page.EnableEventValidation = false;
It is strongly recommended that you do not disable event validation. If you do disable event validation, make sure that no postback could be constructed that could have an unintended effect on your application.
http://msdn.microsoft.com/en-us/library/system.web.ui.page.enableeventvalidation.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With