void Application(object sender ,EventArgs)
{
Application["counter"]=0;
Application["day"]=DateTime.Now.ToString();
}
void Seesion_Start(object sender,EventArgs e)
{
Application.Lock();
int count;//记录文本中的访问量
System.IO.StreamReader srd;
string NowDay;//记录文本中访问时间
string file_path=Server.MapPath("count.txt");
srd=System.IO.File.OpenText(file_path);
while(srd.Peek()!=-1)
{
string str=srd.ReadLine();//保存从文件中读取的信息
}
srd.Close();
string str[]=str.Split(',');//将读取的信息放在字符窜数组中
count Convert.ToInt32(str[0]);//日访问量
string day=str[1];//最后一次访问时间
NowDay=DateTime.Now.ToString();
//文件中保存的时间值也系统时间相比,如果系统时间大,则重新开始计数
if(DateTime.Compare(Convert.ToDateTime(NowDay),COnvert.ToDateTime(day))>=0)
{<