Modifying control with javascript - Invalid postback or callback argument
I have a a dropdown on a page
<asp:DropDownList ID="drpName" AutoPostBack="true" AppendDataBoundItems="true" runat="server" ></asp:DropDownList>
and I on occasion want to add items to it using javascript/jquery.
When I select the items that have been added and it does a postback I get the following error:
*Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page.开发者_如何学Python 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. *
Any ideas on how to get around this?
Thanks,
See this related post: Invalid postback or callback argument. Event validation is enabled using '<pages enableEventValidation="true"/>'
精彩评论