分类：电脑/网络-互联网
问题：如何写一个在线人数统计？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);}