Thanks Alot for the viewstate code, can you help this?

R

Ramez T. Mina

Many thanks,
but still need something else.
I made an sql command and the resultant records is stored in array, but when
I click the button to go to the next result it doesn't work.
find the code here

{

If Not ViewState("n") Is Nothing Then

n = CInt(ViewState("n"))

End If

n += 13

ViewState("n") = n

Label27.Text = n

If Not ViewState("n") Is Nothing Then

n = CInt(ViewState("n"))

End If

If Not ViewState("DBval(0 + n)") Is Nothing Then

DBval(0 + n) = CStr(ViewState("DBval(0 + n)"))

End If



Label1.Text = DBval(0 + n)

Label2.Text = DBval(1 + n)

Label3.Text = DBval(2 + n)

Label4.Text = DBval(3 + n)

Label5.Text = DBval(4 + n)

Label6.Text = DBval(5 + n)

Label7.Text = DBval(6 + n)

Label8.Text = DBval(7 + n)

Label9.Text = DBval(8 + n)

Label10.Text = DBval(9 + n)

Label11.Text = DBval(10 + n)

Label12.Text = DBval(11 + n)

Label13.Text = DBval(12 + n)

Label27.Text = n

}



where DBval has values m * 13 (m is the number of the records)
 
G

Guest

Hi

What do you cache here in the ViewState
If Not ViewState("DBval(0 + n)") Is Nothing The
DBval(0 + n) = CStr(ViewState("DBval(0 + n)")
End I

Is "DBval(0 + n)" an name Token for a ViewState Item
If DBval is an array
If Not ViewState("DBval") Is Nothing The
DBval = CStr(ViewState("DBval")
End I

Bin Song, MCP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top