I have a page with a repeater and a button. (pretty simple)
My repeater has an event rptEtats_ItemCreatedraisedOnItemCreated
<asp:Repeater ID="rptEtats" runat="server" OnItemCreated="rptEtats_ItemCreated">
<ItemTemplate>
</ItemTemplate>
</asp:Repeater>
CodeBehind:
public void rptEtats_ItemCreated(object sender, RepeaterItemEventArgs e)
{
}
The button on the page raises the OnClick event
<asp:Button ID="btnValid" runat="server" Text="Valid" OnClick="btnValid_click" />
CodeBehind:
public void btnValid_click(Object sender, EventArgs e)
{
}
It works fine until I press the button, I expect the method btnValid_click, but the method rptEtats_ItemCreatedis called first! I do not understand why. Does page loading repeat before calling the button method? Why does the repeater bind the data again?
source
share