I am in the process of converting a large C# asp.net 1.1 project to asp.net 2.0. Everything works in asp.net 1.1, but not in asp.net 2.0. I have managed to get everything to compile and for the most part everything works, but I have run across the following error:
Invalid post or callback. <pages EventValidation="True"/> in configuration or <%@Page EnableEventValidation="true"%> in a page. For security purposes, this feature verifies the arguments to post back or callback events originate from the server control that originally rendered them. If the data is valid and expected, use ClientScriptManager.Register for event validation method in order to register the postback or call back data for validation.
The situation is that I have one page launching another and the launched page attempts to post back to the original page. My confusion comes in when this worked in ASP.Net 1.1, but not in asp.net 2.0. I have verified that "EventValidation" is found no where in the project or it's dependencies. If I do have to use the ClientScriptManager.Register method does the call need to go into the parent page or the child page, and, where am I supposed to put this call?
Any assistance that you can provide would be greatly appreciated.
According to the documentation the default value for the
EnableEventValidationproperty istrue.If you wan't to disable it you should explicitly set the value to
false. This is not recommended though: