首页 >> Asp编程 >> Asp实例教程 >> ASP状态封装类Cache、Cookie & Session(3)

ASP状态封装类Cache、Cookie & Session(3)

作者:Movoin 来源:Movoin ^ Blog 时间:2008-5-11 网友评论条 【

SessionState类,建议实例化时用名Session

程序代码

<%
Class SessionState

Public Default Property Get Contents(ByVal Key)
Contents = Session(Key)
End Property

Public Property Let TimeOut(ByVal value)
Session.TimeOut = value
End Property

Public Property Get TimeOut()
TimeOut = Session.TimeOut
End Property

Public Sub Add(ByVal Key, ByVal value)
Session(Key) = value
End Sub

Public Sub Remove(ByVal Key)
Session.Contents.Remove(Key)
End Sub

Public Function values(ByVal Key)
values = Session(Key)
End Function

Public Sub Clear()
Session.Abandon()
End Sub

Public Sub RemoveAll()
Clear()
End Sub

Private Sub Class_initialize()
End Sub
Private Sub Class_Terminate()
End Sub

End Class
%>
站长工具
英文域名注册及Whois查询:
相关文章
loading 请稍等,评论加载中...

Aspxhome.com. 中国Asp之家. 版权所有

闽ICP备06017341号