protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
if (chk.Checked)
{
Session[chk.UniqueID] = true;
}
else
{
Session.Remove(chk.UniqueID);
}
}
protected void CheckBox1_DataBinding(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
chk.Checked = Session[chk.UniqueID] != null;
}
aspx:file:<asp:TemplateField HeaderText="Select" >
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged"
OnDataBinding="CheckBox1_DataBinding" ></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
Checkbox state maintains but fall when paging performed by means selects same rows in page it automatically select another page 1 row again how to slove this by coing