UpdatePanel with "invalid postback or callback argument" error
I've got a .ascx server control in ASP.NET 2.0 that contains several other .ascx server controls. Everything in the top-level one is wrapped in an UpdatePanel. It works great until the second time I do something on the page, and then I get this error in an alert dialog:
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.
This seems like a common error; a Google search turns up several results. They all seem to say that if a postback happens, you have to make开发者_StackOverflow sure to call Update on any UpdatePanels that contain controls that were updated. But when I'm debugging this my whole page is contained inside one UpdatePanel (whose UpdateMode is Always), so that doesn't seem right. What's going on?
精彩评论