I am using two dropdown list and one GridView.

I have taken two update panels.

In first update panel i have placed second dropdownlist in which data is

coming based on the value selected in the first dropdown list

In second update panel i have placed gridview in which data is coming

based on the value selected in the second dropdown list

There is a link button in one column of gridview but when I am clicking

the link button First time nothing is happening and second time I am

getting the error message:

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

Member Avatar for emala

I had the same problem using AJAX.
You can reference the ENABLEVENTVALIDATION and set it as OFF, like this...

<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="XXXXXXX.aspx.cdcab7d2" title="Untitled Page" enableeventvalidation="false" %>

I hope it will help you.
Regards
EMALA


I am using two dropdown list and one GridView.

I have taken two update panels.

In first update panel i have placed second dropdownlist in which data is

coming based on the value selected in the first dropdown list

In second update panel i have placed gridview in which data is coming

based on the value selected in the second dropdown list

There is a link button in one column of gridview but when I am clicking

the link button First time nothing is happening and second time I am

getting the error message:

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

>Error: Invalid postback or callback argument.

Event validation - What came back to the server is not what it sent down.

Three possible options. I guess,

1. Disabled the eventvalidation however, it is not a good idea because you lose a little of security.

2. Manage Updatepanel controls. ViewState and eventvalidation field should be updated properly.

3. Forget client-side and use the classic postback.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.