Get session id if it is a new session (VB.net)
<%@ Page Language="vb" %>
<html>
<head>
<script runat="server">
Sub Page_Load()
If Session.IsNewSession Then
Message.Text = "The current Session (SessionID: " & _
Session.SessionID & ") was created with this request."
Else
Message.Text = "The current Session (SessionID: " & _
Session.SessionID & ") existed prior to this request."
End If
End Sub
</script>
</head>
<body>
<asp:label id="Message" runat="server"/>
</body>
</html>
Related examples in the same category