ASP.Net/Session Cookie/New Session — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 15:30, 26 мая 2010
Session.IsNewSession (VB.net)
<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
Session.TimeOut = 2
If Session.IsNewSession Then
lblMessage.Text = lblMessage.Text _
& "The request made to this page spawned a " _
& "new session.<BR>"
Else
lblMessage.Text = lblMessage.Text _
& "The request made to this page did not " _
& "spawn a new session.<BR>"
End if
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Session Properties</TITLE>
</HEAD>
<form runat="server">
<asp:label
id="lblMessage"
font-size="12pt"
font-name="Tahoma"
runat="server"
/>
</form>
</BODY>
</HTML>