日期:2012-05-11  浏览次数:20475 次

<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>