|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
If you are using ASP 3.0 (the version of ASP that comes with Windows 2000 / IIS 5) then you can use the following syntax: Session.Contents.Remove "name" where Name is the name of the Session variable you wish to remove. Removing Session variables in this way has its advantages over using the following method: Session("Name") = Null Namely, the above method (setting a Session variable to Null) only removes the memory associated with the Session variable itself... the Session object still maintains a reference to it, though. Each Session variables is stored in the Session object with a key/item pair, similar to the Scripting.Dictionary object. Therefore, using the Null method above, you are not removing the key from the Session Contents collection that contains the reference to the variable... With the Remove method that we looked at first, you are removing both the key and item associated with a Session variable. There is also a RemoveAll method that can be used to scrap all of the Session variables completely: Session.Contents.RemoveAll Again, the Remove and RemoveAll methods are new to ASP 3.0. If you have ASP 2.0, you will need to use the Null method 返回类别: 教程 上一教程: 方便购买的电子商务站点设计技巧 下一教程: 操作必须使用一个可更新的查询解决办法 您可以阅读与"关于释放session的两篇文章(一)"相关的教程: · 关于释放SESSION的两篇文章(二) · 关于释放SESSION的两篇文章(一) · 关于释放session的两篇文章(二) · 关于SESSION的一些问题 · ASP中关于SESSION的一些问题 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |