Hi I am using grid view to populate data from database, but when I click next page button of grid view I am getting 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 saw somewhere to add following line to aspx page
<%@ Page EnableEventValidation="false" %>
when I used it, it gives another exception
The directive 'Page' is unknown