请问怎样记录一个页面的存在时间
从pageload 开始到跳转到其他页面.
------解决方案-------------------- <script language= "C# " runat=server>
DateTime startTime;
void Page_Init (Object sender, EventArgs e) //页面加载
{
startTime = DateTime.Now;
}
protected override void Render(HtmlTextWriter writer) //加载结束
{
base.Render(writer);
DateTime endTime = DateTime.Now;
Response.Write( "done in " + (endTime-startTime));
}
</script>