asprepeater

Set CheckBox “Checked” propery in ASP repeater

若如初见. 提交于 2019-12-01 06:09:37
问题 I was wondering if it's possible to set the checked propery of a checkbox, using a bool variable form the repeater's datasource? I've tried several ways but without any success...: <asp:Repeater ID="rpt" runat="server"> <itemTemplate> <asp:CheckBox runat="server" CssClass="checkbox" Checked="<%#Eval("IsDefault").ToString().ToLower()%>" ID="isDefaultCheckBox"/> </itemTemplate> </asp:Repeater> <asp:Repeater ID="rpt" runat="server"> <itemTemplate> <asp:CheckBox runat="server" CssClass="checkbox"