开发者

ASP.NET loading page timer

How could I implement loading timer that are automatically appended to the each displayed page in ASP.NET and MVC?

I was thinking to implement it in Global.asax. To log the start of the request and and the end calculate a time and then smartly append it to output strea开发者_如何学Cm somehow. It could also be implemented in HTTP handler ...

I would like to know how to implement it in the most elegant way and to do the proper display of the result on the each page.


See for example: http://haacked.com/archive/2008/07/02/httpmodule-for-timing-requests.aspx


There is functionality included in ASP.NET to achieve this, called Tracing, or sometimes just trace.axd. See this question for an MVC specific implementation.

ASP.NET tracing enables you to view diagnostic information about a single request for an ASP.NET page. ASP.NET tracing enables you to follow a page's execution path, display diagnostic information at run time, and debug your application. ASP.NET tracing can be integrated with system-level tracing to provide multiple levels of tracing output in distributed and multi-tier applications.

alt text http://i.msdn.microsoft.com/wwh16c6c.traceaxd(en-us,VS.90).gif

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜