开发者

how do i know how much time took the whole page loading time in asp.net?

i currently use the context.timestamp function to get the time in the 开发者_JAVA技巧beginning of the request but i want to know if i can check the time sooner in the pipeline (before the load page phase) or the timestamp is the earlier time i can get. now i need to find the latest time after the request was processed, of course i can check the time in the end of the function, but is there somewhere else where i can check the time of the request ending.

thanx!


Maybe just adding a <%@ Page Trace="true" %> into your page is enough.

Please, take a look into ASP.NET Trace.


Because sometimes the Trace="true" doesn't work nicely with CSS, you can also, check this page : Show page load time, which has a very detailed explanation (and various different ways) on how to do this.


You can also tap into the IIS pipeline more directly by adding event handlers in Global.asax. You could handle BeginRequest and EndRequest for example, which occur well before and well after your Page handler is invoked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜