Is this session a new session ( : Session ID « Session Cookie « ASP.Net

Is this session a new session (

<%@ Page Language="vb" %>
      <script runat="server">
         Sub Page_Load()
            If Not IsPostBack
               If Session.IsNewSession Then
                  Session("key1") = "value1"
                  Message.Text = "The current Session (SessionID: " & _
                     Session.SessionID & ") was created with this request."
                  Message.Text = "Click the button to abandon the current session."
                  Dim AbandonButton As New Button
                  AbandonButton.Text = "Abandon Session"
               End If
               Message.Text = "Session abandoned."
            End If
         End Sub
   <form id="myForm" runat="server">
      <asp:label id="Message" runat="server"/>


Related examples in the same category

1.Get session id if it is a new session (