Hello to all Now I am going to tell you that How can You bind checkbox in datalist and make it Checked and unchecked in .aspx page itself. No Need to do code at .cs page
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("status").ToString() == "1" ? true : false %>' />
</ItemTemplate>
</asp:DataList>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("status").ToString() == "1" ? true : false %>' />
</ItemTemplate>
</asp:DataList>
No comments:
Post a Comment