What you have looks correct.
So, say in PageA.aspx, I have this markup:
<h3>Enter value to pass to page B</h3>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Button ID="cmdJump" runat="server" Text="Jump to page B"
OnClick="cmdJump_Click"
/>
And code behind for the button is:
Protected Sub cmdJump_Click(sender As Object, e As EventArgs)
HttpContext.Current.Session("myTestVariable") = TextBox1.Text
Response.Redirect("PageB.aspx")
End Sub
And on PageB.aspx, this markup:
<h3>Session Value passed from Page A is</h3>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
And code behind for PageB.aspx is:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myString As String = HttpContext.Current.Session("myTestVariable")
Label1.Text = myString
End Sub
Hence, the result is this:
So, there must be some additional information you are leaving out, as we are unable to reproduce your error.
What you have looks just fine.
Does the above sample code not work say on your developer computer, but fails on the production server?