How to show the refresh time of a web page

A

ad

I have a web page which show a lot of data, it waste a lot of time to show
the data.
I wnat to know how much time it take to show the data.
How can I get it?
 
G

Guest

You can use the StopWatch class or just set a DateTime field with
DateTime.Now at the very beginning of page processing (you pick the event you
want to start with) and then say, in Page_Unload, you would set a new
DateTime field to DateTime.Now. Take the timespan difference by subtracting
the first from the last, and get the TotalMilliseconds.
Of course, reading between the lines, this is only going to tell you
something you already know: your page is taking a long time to display data.
Better to investigate why this may be happening and work to create a more
efficient way to get what you want.
Peter
 
G

Guest

Ad,

Enable trace. It will help you to identify which place takes long time to
execute. Go to web.config file, put this
<trace enabled="true" pageOutput="true" requestLimit="1000"/>
under <system.web> section. (You can also use it from trace.axd utility page
when pageOutput is set to false)

Milosz Skalecki
MCAD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top