I am trying to get a cbxSupplement trigger updatepanel refresh, but am not sure if I am using a wrong EventName or it is just impossible to do it with CheckBox. If I replace CheckBox with Button, it works fine.
<asp:Repeater ID="repSupplements" runat="server">
<ItemTemplate>
<asp:CheckBox runat="server" ID="cbxSupplement" />
</ItemTemplate>
</asp:Repeater>
<asp:UpdatePanel runat="server" ID="up1">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="repSupplements" EventName="CheckedChanged" />
</Triggers>
<ContentTemplate>
//Get checked items
</ContentTemplate>
</asp:UpdatePanel>
Since
CheckBoxcontrols inside repeater are not available at design time you should register them with ScriptManager.RegisterAsyncPostBackControl method. This method requiresScriptManagereither on page or on master page.Create a handler for
Repeater.OnItemCreatedevent and there register newly createdCheckBox. The code is following (note thatCheckBoxshould haveAutoPostBackproperty set to true):Codebehind:
This should do what you want.