How to store the state of my check box list tick boxes accross the page life cycle?
Here i have a unbound checkbox list control where values comes from xml file.
how to retain the state?
Moreover, when i click on Next button to the new page and comeback state is retained.
But when i click on the back button and come to the same page state is not retained
Protected Sub chkBx_SR_wu_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkBx_SR_wu.SelectedIndexChanged
Dim i As Integer
i = 0
Try
For i = 0 To chkBx_SR_wu.Items.Count - 1
If chkBx_SR_wu.Items(i).Selected Then
Select Case chkBx_SR_wu.Items(i).Value
Case "SR_MR"
chkbx_SR.Checked = True
Case "Sk_MR"
chkbx_SkRoom.Checked = True
Case "SC_SS"
chkbx_admin.Checked = True
Case "CS_MR"
chkbx_salesFloor.Checked = True
Case "TEAM_LEADER"
rb_tl.Enabled = True
chkbx_tlAdmin.Enabled = True
chkbx_tlJewellery.Enabled = True
chkbx_tlSalesFloor.Enabled = True
chkbx_tlSkRoom.Enabled = True
rb_tl.Items(0).Enabled = True
rb_tl.Items(1).Enabled = True
rb_tl.Items(2).Enabled = True
rb_tl.Items(3).Enabled = True
ReqiredFieldValidator1.Enabled = True
End Select
Else
Select Case chkBx_SR_wu.Items(i).Value
Case "SR_MR"
chkbx_SR.Enabled = False
chkbx_SR.Checked = False
Case "Sk_MR"
chkbx_SkRoom.Enabled = False
chkbx_SkRoom.Checked = False
Case "SC_SS"
chkbx_admin.Enabled = False
chkbx_admin.Checked = False
Case "CS_MR"
chkbx_salesFloor.Enabled = False
chkbx_salesFloor.Checked = False
Case "TEAM_LEADER"
chkbx_tlAdmin.Enabled = False
chkbx_tlAdmin.Checked = False
chkbx_tlJewellery.Enabled = False
chkbx_tlJewellery.Checked = False
chkbx_tlSalesFloor.Enabled = False
chkbx_tlSalesFloor.Checked = False
chkbx_tlSkRoom.Enabled = False
chkbx_tlSkRoom.Checked = False
rb_tl.Items(0).Enabled = False
rb_tl.Items(1).Enabled = False
rb_tl.Items(2).Enabled = False
rb_tl.Items(3).Enabled = False
ReqiredFieldValidator1.Enabled = False
End Select
End If
Next
Catch ex As Exception
End Try
End Sub"