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> |