i'm using asp:repeater in a page, and it has OnItemCommand. but in IE7 (compatibility mode) when i click on the button in repeater , it doesn't work and say this error:
Invalid postback or callback argument. Event validation is enabled using in configuration or 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 is the code:
<asp:Repeater ID="rptExternalLinks" runat="server" OnItemCommand="rptExternalLinks_ItemCommand1">
<ItemTemplate>
<asp:Button ID="lbtnDelet" CssClass="simaUI-icon simaUI-icon-closethick" runat="server" CommandName="DeleteItem" />
</ItemTemplate>
</asp:Repeater>
it work on other browsers like IE9 , FF, Chrome and... but it says that error in IE compatibility mode.
That is really weird behaviour. Unfortunately I wasn't able to reproduce error on the given syntax.
You would definitely get an error if you keep rebinding repeater on every postback, so you have to make sure you bind is only if page is not posting back.
if (!Page.IsPostBack)
{
//your code
}
Also, are you using any meta tags for content caching (client side)? I would also clear the cache of your browser.
If you have any more specific details, please let me know.
Hope it helps.