Next, Previous Navigation through records

saidev

Active member
Joined
Dec 22, 2005
Messages
27
Programming Experience
1-3
Hi Guys,
I am using the below code for Previous and Next Record Navigation in a webpage. I don't want to use the session in this. what happens is if i use the "session" if i go to another webpage and come back it is loosing its state and i cannot navigate through records. can you guys help me with code without using "session".
Thanks

Dim objDS As DataSet = Session("DataSet")
Dim objDataRow As DataRow
Dim Message As String
If objDS.Tables(0).Rows.Count > Session("CurrentIndex") + 1 Then
Session("CurrentIndex") = Session("CurrentIndex") + 1
objDataRow = objDS.Tables(0).Rows(Session("CurrentIndex"))
populateGUI(objDataRow)
Else
MsgboxAlert("You have reached the last record.")
End If
 
Check Viewstate

Just check if you have set the viewstate property to true or not. If not set viewstate property of the form to True. I feel this should workout.
 
Back
Top