aharon
aharon

Reputation: 7643

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

Upvotes: 1

Views: 153

Answers (3)

womp
womp

Reputation: 116977

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.

Upvotes: 0

Alex Ntousias
Alex Ntousias

Reputation: 9132

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.

Upvotes: 1

Rubens Farias
Rubens Farias

Reputation: 57946

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

Please, take a look into ASP.NET Trace.

Upvotes: 2

Related Questions