日期:2014-05-19  浏览次数:20556 次

求别人网页上那个"Porcessed in *.*** second(s)"网页速度的代码??
如题;

------解决方案--------------------
写个httpmodule 在begin_request 里面获得时间 在end_request里面获得时间和前面的相减 然后输出出来就好了
------解决方案--------------------
global.aspx
<script language= "C# " runat= "server ">
static DateTime dStart;
void Application_OnBeginRequest(Object sender, EventArgs e)
{
dStart=DateTime.Now;
}


void Application_OnEndRequest(Object sender, EventArgs e)
{
Response.Write( "页面执行时间 "+DateTime.Now.Subtract(dStart));
}
</script>