Keep data in servercontrol between navigation

S

Simon

Hello,
Please sorry my poor English.

I have 3 aspx webforms. Each page has 2 hyperlinks objets to go
on the other pages. In all the webforms, there are textbox, ddlists,
button and a datagrid. I want the data in each webpage to be saved and
not losed while i'm surfing between those pages(like tab navigation).

Presently, I use session variable and query post to keep the data.
Example :
hplink.navigateurl = "page1.aspx?textbox1=3&textbox2=3"
and on onload, I request.param and this works well...

This would be fine if I could have something who save session
variables before using HPlink. Like a kind of onchangepage, SAVE
SESSION, and it keep the value in the textbox in memory... Now I am
not able to save data, I need to postback, and I don't want use a
button for each saving...

Please help! Thank you
Simon
 
K

Ken Cox [Microsoft MVP]

You might want to try using a LinkButton for this. You can take a number of
actions and then redirect to the other page:

Private Sub LinkButton1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles LinkButton1.Click
Session("MyValue") = 10
Response.Redirect _
("page1.aspx?textbox1=3&textbox2=3")
End Sub

Ken
 

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,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top