Very strange: I use Server.transfer to post information to a new page with sessions. It's also possible to use response.redirect with this.
My problem is, that when I run the application (webform1.aspx as startpage), type some text and clicks the button, then webform2.aspx is shown, fine. But when I click BACK, webform1.aspx is shown, but WITHOUT the text that I entered.
My code is:
Webform1:
Webform2:Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Session("test") = Me.TextBox1.Text Server.Transfer("webform2.aspx") End Sub
Code:Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here TextBox1.Text = Session("test") End Sub




Reply With Quote