There are two CheckBoxes one is in outer Repeater and other is inside inner Repeater.
I would like to automatically check CheckBox of inner Repeater when checked the outer Repeater's CheckBox.
HTML Markup:
<asp:Repeater ID="repOuter" runat="server">
<ItemTemplate>
<asp:CheckBox ID="chkOuter" runat="server"
OnCheckedChanged="chkOuter_CheckedChanged" />
<asp:Repeater ID="repInner" runat="server">
<ItemTemplate>
<asp:CheckBox ID="chkInner" runat="server" />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Code-Behind
protected void chkOuter_CheckedChanged(object sender, EventArgs e)
{
// can't have access to inner CheckBox placed inside Inner Repeater
CheckBox innerCheckBox; // how?
innerCheckBox.Checked = true; // want to check it
}
Aucun commentaire:
Enregistrer un commentaire