re:
For instance, if I set a session variable on page1,
and someone clicks a button which uses a
Response.Redirect to send them to page2,
why is it that the session variable is no longer
recognized as being set?
I don't understand your problem, Roy.
See
http://asp.net.do/test/Session1.aspx and click the redirect button.
The session variable set in session1.aspx is written to the session2.aspx page.
No problem.
Here's the code for both aspx pages :
session1.aspx:
----------------------
<%@ Page Language="VB" %>
<script runat="server">
Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect("/test/Session2.aspx")
End Sub
</script>
<html>
<head>
<title>Session 1</title>
</head>
<body>
<%Session("testRedirect") = "My Test Session Redirect Variable"%>
<form id="form1" runat="server">
<asp:Button ID="Button1" Runat="server" Text="Redirect" OnClick="Button1_Click" />
</form>
</body>
</html>
----------------
session2.aspx:
----------------------
<%@ Page Language="VB" %>
<html>
<head>
<title>Session2.aspx</title>
</head>
<body>
<%=Session("testRedirect")%>
</body>
</html>