Keep data in servercontrol between navigation

  • Thread starter Thread starter Simon
  • Start date Start date
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
 
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
 
Back
Top