views:

214

answers:

0

In Sharepoint - EditForm.aspx, I am doing dynamic cascading drop-downs. Adding drop-down values dynamically using Jquery. Values are not there in the choices list of the drop-down. When I click OK button I get "Invalid postback or callback argument.Event validation is enabled using 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."

  1. Edit.aspx page is inherited from the WebPartPage class so I cannot disable the "EnableEventValidation="false" or can't modify the web.config file.
  2. It is hard to register all the values before page_load because without filtering the dropdown values there are more than 500 values. (If I filter then less than 20 choices in the dropdown)
  3. In Page_Load I get all the dropdown controls of the EditForm.aspx page and try to set CausesValidation property to False but that doesn't work either.

Please reply if you know the answer. Thank you in advance.