<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Session State
File: Default.aspx.vb
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Session("mykey") = TextBox1.Text
End Sub
End Class
File: NextPage.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="NextPage.aspx.vb" Inherits="Retrieve" %>
Untitled Page
File: NextPage.aspx.vb
Partial Class Retrieve
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myValue As String = CType(Session("mykey"), String)
Response.Write(myValue)
End Sub
End Class