Last post Oct 20, 2016 03:03 AM by Cathy Zou
Oct 19, 2016 09:37 AM|vikas251074|LINK
How can I use 'RegisterForEventValidation' in place of 'EnableEventValidation="false"'
Oct 19, 2016 12:48 PM|codemovement.pk|LINK
The problem is that ASP.NET does not get to know about this extra or removed listitem. You got an number of options (listed below):
Please use update panel in your case and it will solve your problem. if you want I can send you some working example of update panel.
I hope this helps.
Oct 20, 2016 03:03 AM|Cathy Zou|LINK
According to official document, EnableEventValidation could allow us to get or set a value indicating whether the page validates postback and callback events.
If EnableEventValidation’s value is set to false, it indicate that page don’t validate postback and callback events,
However, RegisterForEventValidation is used to Registers an event reference for validation with a unique control ID and event arguments representing the client control generating the event.
When you set EnableEventValidation to true, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation
method in order to register the postback or callback data for validation.
When you set EnableEventValidation to false, it indicate that no event validation( neither built-in validation or some validation you register by using RegisterForEventValidation) will be triggered when page do postback and callback.
In a word, from my understanding, the function of the two is different, So, it is impossible to use 'RegisterForEventValidation' in place of 'EnableEventValidation="false"'