code behind:
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: OnDataBinding="CheckBox1_DataBinding" >
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pradeep ShetPosted May 5, 2016, 2:40 AM