application 简介绍与计数器实例
event-handling方法描述
application_start()发生当应用程序的开始
这是他第一次收到任何用户的要求。
application_end()发生当应用程序正在关闭的时候,通常而言,是因为网络服务器正在重新启动。
application_beginrequest()中,发生在每个请求的应用得到的,就在这个页面代码被执行。
application_endrequest()
简单存值实例
sub click(obj as object, e as eventargs)
session.abandon()
end sub
利用application 做简单计数器
"">
http://www.w***3.org/1999/xhtml" >
锁定application
http://www.*w**3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
http://www.w***3.org/1999/xhtml" >
file: default.aspx.cs
using system;
using system.data;
using system.configuration;
using system.web;
using system.web.security;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.webcontrols.webparts;
using system.web.ui.htmlcontrols;
public partial class _default : system.web.ui.page
{
protected void page_load(object sender, eventargs e)
{
if (application["pagecounter"] != null &&
(int)application["pagecounter"] >= 10)
{
application.remove("pagecounter");
}
if (application["pagecounter"] == null)
{
application["pagecounter"] = 1;
}
else
{
application.lock();
application["pagecounter"] =
(int)application["pagecounter"] + 1;
application.unlock();
}
mylabel.text = convert.tostring(application["pagecounter"]);
}
}
恋爱进行时九游版
恋爱进行时九游版是一款以模拟恋爱玩法为核心的角色扮演手游,精
皇室对决fr(Null’s Royale)
皇室对决fr,即皇室战争的私服变态版本,在该版本中玩家能够拥
养了个猫联机版游戏
养了个猫小游戏一个猫咪主题的模拟经营类型的手游,在游戏中我那
模拟山羊收获日小米版
模拟山羊收获日小米版是一个极其魔性的手机游戏,在游戏中玩家将
女配逆袭之素衣
女配逆袭之素衣是一款恋爱养成冒险的一款游戏,可以角色扮演,在