Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim CheckBoxArray As ArrayList
If ViewState("CheckBoxArray") IsNot Nothing Then
CheckBoxArray = DirectCast(ViewState("CheckBoxArray"), ArrayList)
Else
CheckBoxArray = New ArrayList()
End If
Dim c As New ContCLS
If Not IsPostBack Then
'Bind Your Grid Here
Dim dt As DataTable = c.find()
GVCont.DataSource = dt
GVCont.DataBind()
End If
If Page.IsPostBack Then ' this code for stay checked true if checked when go to next page
Dim CheckBoxIndex As Integer
Dim CheckAllWasChecked As Boolean = False
Dim chkAll As CheckBox = DirectCast(GVCont.HeaderRow.Cells(0).FindControl("ChbALL"), CheckBox)
Dim checkAllIndex As String = "ChbALL-" & GVCont.PageIndex
If chkAll.Checked Then
If CheckBoxArray.Inde ...
Go to the complete details ...