网页的加载时间

Global.asax

protected   void  Application_BeginRequest(Object sender, EventArgs e)
        
{
            Application[
"start"= DateTime.Now ;                    }


        
protected   void  Application_EndRequest(Object sender, EventArgs e)
        
{
            System.TimeSpan aa 
= DateTime.Now -(System.DateTime) Application["start"];
            
            Response.Write(aa.TotalSeconds.ToString(
"#00.000"));
        }

你可能感兴趣的:(时间)