Invalid postback or callback argument. Event validation is enabled using ''

后端 未结 30 1869
生来不讨喜
生来不讨喜 2020-11-22 05:08

I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side.

How do we fix

30条回答
  •  日久生厌
    2020-11-22 05:35

    I know that this is a super-old post. Assuming that you are calling into your application, here is an idea that has worked for me:

    1. Implement the ICallbackEventHandler on your page
    2. Call ClientScriptManager.GetCallbackEventReference to call your server side code
    3. As the error message states, you could then call ClientScriptManager.RegisterForEventValidation

    If you don't need total control, you could use an update panel which would do this for you.

提交回复
热议问题