记录页面停留时间

发表于:2007-06-30来源:作者:点击数: 标签:
<script language="C#" runat=server>

DateTime startTime;

void Page_Init (Object sender, EventArgs e) //页面加载
{
startTime = DateTime.Now;
//Response.Write("page init<br/>");
}

protected override void Render(HtmlTextWriter writer) //加载结束
{
base.Render(writer);

DateTime endTime = DateTime.Now;
Response.Write("done in " + (endTime-startTime));
}

</script>


原文转自:http://www.ltesting.net