A
arun
I have a GridView with a a checkbox as below.
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true"
checked='<%# Eval("BooleanField1") %>'
OnCheckedChanged="CheckBox1_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="true"
checked='<%# Eval("BooleanField2") %>'
OnCheckedChanged="CheckBox2_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
I want the database to get updated whenever I check or uncheck the
CheckBox1,
ie the value of "BooleanField1" in the database should be changed to
True or False.
And same with CheckBox2.
How can I accomplish this?
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true"
checked='<%# Eval("BooleanField1") %>'
OnCheckedChanged="CheckBox1_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="true"
checked='<%# Eval("BooleanField2") %>'
OnCheckedChanged="CheckBox2_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
I want the database to get updated whenever I check or uncheck the
CheckBox1,
ie the value of "BooleanField1" in the database should be changed to
True or False.
And same with CheckBox2.
How can I accomplish this?