CoderZone.org

Category: >> ASP/VB Code >> Check if current session is using cookies Bookmark and Share

<< lastnext >>

Snippet Name: Check if current session is using cookies

Description: An example of using VB.net to check if the current session is using cookies or not.

Also see:
» Allow access to a page only once
» Encrypted Sessions
» TIMESTAMP: SessionTimeZone
» Kill Session
» DBA Sessions

Comment: (none)

Author:
Language: VB
Highlight Mode: VBNET
Last Modified: December 03rd, 2010

<%@ Page Language="vb" %>
<html>
   <head>
      <script runat="server">
         Sub Page_Load()
            If Session.IsCookieless Then
               Message.Text = "The current Session is not using cookies."
            Else
               Message.Text = "The current Session is using cookies."
            End If
         End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 19