I've got a Imagebutton in a repeater.
Code:
<asp:Repeater ID="repImages" runat="server">
<ItemTemplate>
<div>
<div><asp:ImageButton ID="btnDeleteImage" Width="7" Height="7" runat="server" AlternateText="Verwijder afbeelding" OnClientClick="return confirm('Weet u zeker dat u deze afbeelding wil verwijderen?');" OnClick="ImageButton_OnClick" ImageUrl="~/images/spacer.gif" /></div>
<img id="imgImage" runat="server" src='<%# GetOccasionPath(int.Parse(Eval("ID").ToString()),Eval("BaseFileName").ToString(), TypeImage.thumbnail) %>' />
</div>
</ItemTemplate>
</asp:Repeater>
It is displayed well, but if i press the button btnDeleteImage he doesn't even run ImageButton_OnClick , also there is no data included just for testing...
protected void ImageButton_OnClick(object source, EventArgs e)
{
}
But still i get this error:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> 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.
Also enableEventValidation="true" is placed in the page.
What can i do to solve this?
View Complete Post