I have an asp.net page which loads through ajax results from a query to a database, when te page loads it actually does this through jquery, so basically the page loads and then through jquery I go to the database get some results and fill a div with them.

Then I have a filter area where you can select some data from drop down lists, in fact I have a cascading drop down list which uses a web service to fill its options based on its previous drop down list selected option.

Until then everything works fine.

After that I have a normal HTML Button, which gets the values of the drop down lists and attempts to run the same method I use in the document ready jquery function but with the difference that the data now has the drop down lists selected values when in document ready it had the default values.

I bind the button to the click event, and in that even I call the function needed.

The next error appears:

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.

The thing is if I understood I'm not making a postback right? because I'm using ajax and generating the code through javascript calling the server side functions through there? Or how can avoid that problem? Or I'm trying to do something that cannot be done?

Thanks in advance.

6 Years
Discussion Span
Last Post by MrCapuchino

Well I fixed it,

I return a false at the end of the javascript method but is this the right approach?

Thanks in advance

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.