<asp:Repeater ID="rptrrol" runat="server" OnItemDataBound="rptrrol_ItemDataBound"> <ItemTemplate> <dl> <dt> <button id="btn" runat="server">+</button><asp:CheckBox ID="chkrole" runat="server" CssClass="topic" Text='<%#Eval("role") %>' ValidationGroup="user" AutoPostBack="true" Checked='<%# Eval("role")%>' /> <asp:Repeater ID="rptrsubrole" runat="server"> <ItemTemplate> <dd style="margin-removed 10px;"> <asp:CheckBox ID="chksubrole" runat="server" Text='<%#Eval("role") %>' ValidationGroup="user" /> <br /> </dd> </ItemTemplate> </asp:Repeater> </dt> </dl> </ItemTemplate> </asp:Repeater>
protected void btnsave_Click(object sender, EventArgs e) { foreach (RepeaterItem item in rptrrol.Items) { CheckBox ch = item.FindControl("chkrole") as CheckBox; if (ch != null && ch.Checked == true) { ch.Text = "IT is selected now"; } } }
Checked='<%# Eval("ObjectCheckedBooleanProperty") #>'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)