ClientScript.RegisterForEventValidation()

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi all

I have 2 drop down lists, the data in the second list is based on the users selection from the first list. However I am getting the following error when I press a button to proceed with any operation:
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.

From google, one suggestions is to set the EnableEventValidation in the page source to false, however I definately don't want to do this. The second option suggested was to call the cmd:
Code:
ClientScript.RegisterForEventValidation(me.UniqueId)

To call this cmd, it must be in the Render declaration of the page, however from what I can see the page does not have such a declaration, only a PreRender.

Any suggestions?

Mike55.
 
Back
Top