举个例子,希望对你有帮助 Your session contains: " & \
Sub Session_Add(sender As Object, e As EventArgs)
Session("MySession") = text1.Value
span1.InnerHtml = "Session data updated!
Session("MySession").ToString() & ""
End Sub
Sub CheckSession(sender As Object, eAs EventArgs)
If (Session("MySession")Is Nothing) Then
span1.InnerHtml = "NOTHING, SESSION DATA LOST!"
Else
span1.InnerHtml = "Your session contains: " & \
Session("MySession").ToString() & ""
End If
End Sub