A
Amadeus Consulting
I am developing a control in ASP.NET 2.0 that is derived from GridView. This
control handles paging on its own and thus renders custom paging buttons. It
also add some other functionality to the GridView by overriding Render() and
rendering other controls alongside the GridView’s HTML.
When I click one of the pager buttons (of type ImageButton), I receive the
following error:
Invalid postback or callback argument. Event validation is enabled using
<pages enableEventValidation="true"/> in configuration or <%@ Page
EnableEventValidation="true" %> in a page. For security purposes, 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.
I have searched for other people that have encountered this error, and the
common suggestion is to specify <pages enableEventValidation=â€false†/> to
remedy the problem. I would like to avoid this solution. I’m sure there is a
way to have my controls behave nicely with event validation.
Any help will be appreciated. Thanks!
control handles paging on its own and thus renders custom paging buttons. It
also add some other functionality to the GridView by overriding Render() and
rendering other controls alongside the GridView’s HTML.
When I click one of the pager buttons (of type ImageButton), I receive the
following error:
Invalid postback or callback argument. Event validation is enabled using
<pages enableEventValidation="true"/> in configuration or <%@ Page
EnableEventValidation="true" %> in a page. For security purposes, 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.
I have searched for other people that have encountered this error, and the
common suggestion is to specify <pages enableEventValidation=â€false†/> to
remedy the problem. I would like to avoid this solution. I’m sure there is a
way to have my controls behave nicely with event validation.
Any help will be appreciated. Thanks!