如何写一个在线人数统计?asax文件c#当中的asax文件ax
当中的asax文件 ax
voidSession_Start(objectsender,EventArgse){//Response.Write(Session.SessionID);//CodethatrunswhenanewsessionisstartedApplication["peoplecount"]=((int)Application["peoplecount"]+1);}voidSession_End(objectsender,EventArgse){//Codethatrunswhenasessionends.// // nfigfile.IfsessionmodeissettoStateServer//orSQLServer,theeventisnotraised.Application["peoplecount"]=((int)Application["peoplecount"]-1);}