I'm trying to go beyond what the book covers with session states but am not getting very far. I am setting the session state on one page, then checking to see if it exists on another. However, it's not working. Below is the code that I am using the check to see if the session state is present, and then what conditions to take based on that. The only condition that will take place is the very last one, which should be the result if the session hasn't been set. Any help would be appreciated.
<script language="
vb" runat="server">
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
Dim SessionId As Long
Dim userClass
'Determine if User is logged in
Try
SessionId = Session.SessionID
If SessionId <> "" then
userClass = Session("class").ToString()
company.text = Session("company").ToString()
expirationDate.text = Session("expiration").ToString()
If userClass <> "Client" OR userClass <> "Administrator" then
Response.Redirect("/debug/notaccepted.html")
End If
Else
Response.Redirect("/debug/accepted.html")
End If
Catch excp as Exception
Response.Redirect("/debug/notset.html")
End Try
End Sub
</script>