By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,723 Members | 1,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,723 IT Pros & Developers. It's quick & easy.

display time needed for creation of the page

P: n/a
hello,

what is the best way to display display the time needed for rendering the
information. I must get the difference of time from the start of rendering
till the finish rendering the page - but any ideas how to do it?

My customer want to have such a info on every page, somthing like 0,12 sek

best regards
Feb 9 '06 #1
Share this Question
Share on Google+
6 Replies

P: n/a
Well, you could record the time in the Page_Init and also in the
Page_PreRender and then in the Page_PreRender, change a label that you might
have so that it's text contains the difference between the two times.

"Xavier" <Xa****@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
hello,

what is the best way to display display the time needed for rendering the
information. I must get the difference of time from the start of rendering
till the finish rendering the page - but any ideas how to do it?

My customer want to have such a info on every page, somthing like 0,12 sek

best regards

Feb 9 '06 #2

P: n/a
Hard to do with ASP 1.1 or 2.0 as the first time it renders is much slower
than subsequent times so your data will be misleading. You might want to do
an average over some predefined session of multiple pages.
"Xavier" <Xa****@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
hello,

what is the best way to display display the time needed for rendering the
information. I must get the difference of time from the start of rendering
till the finish rendering the page - but any ideas how to do it?

My customer want to have such a info on every page, somthing like 0,12 sek

best regards

Feb 9 '06 #3

P: n/a
Answer to Xavier:

Not sure where problem is.
Just do it.
First line in HTML.

<%
long l1 = DateTime.Now.Ticks;
%>

Last line
<%
long l2 = DateTime.Now.Ticks;
Response.Write( (l2-l1)/1000);
%>
George.

"Rob R. Ainscough" <ro*****@pacbell.net> wrote in message
news:uD**************@TK2MSFTNGP15.phx.gbl...
Hard to do with ASP 1.1 or 2.0 as the first time it renders is much slower
than subsequent times so your data will be misleading. You might want to
do an average over some predefined session of multiple pages.
"Xavier" <Xa****@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
hello,

what is the best way to display display the time needed for rendering the
information. I must get the difference of time from the start of
rendering
till the finish rendering the page - but any ideas how to do it?

My customer want to have such a info on every page, somthing like 0,12
sek

best regards


Feb 9 '06 #4

P: n/a
thanks for your replay.
My problem is - how can i simply add such a feature in a simply way to all
pages. I think something like create a new class inherited from a page ....
and then all aspx pages of the site should be inherited from this new class
.....

I did not know if this is a possible or a good concept. I did not want to
implement in each codebehind of every page manually the necesary code

Any ideas, is this possible?
thanks

"George Ter-Saakov" wrote:
Answer to Xavier:

Not sure where problem is.
Just do it.
First line in HTML.

<%
long l1 = DateTime.Now.Ticks;
%>

Last line
<%
long l2 = DateTime.Now.Ticks;
Response.Write( (l2-l1)/1000);
%>
George.


Feb 9 '06 #5

P: n/a
Really depends on your design.
The Master pages design is perfect. Then all you have to do is to change
the master page and all your pages would be changed.

Is you do not have that design then you need to go and touch every aspx
page. Since you need to modify HTML anyway to display that information.
George.
"Xavier" <Xa****@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
thanks for your replay.
My problem is - how can i simply add such a feature in a simply way to all
pages. I think something like create a new class inherited from a page
....
and then all aspx pages of the site should be inherited from this new
class
....

I did not know if this is a possible or a good concept. I did not want to
implement in each codebehind of every page manually the necesary code

Any ideas, is this possible?
thanks

"George Ter-Saakov" wrote:
Answer to Xavier:

Not sure where problem is.
Just do it.
First line in HTML.

<%
long l1 = DateTime.Now.Ticks;
%>

Last line
<%
long l2 = DateTime.Now.Ticks;
Response.Write( (l2-l1)/1000);
%>
George.

Feb 9 '06 #6

P: n/a
yes for 2.0 it's perfect to use.
thanks for your help.

"George Ter-Saakov" wrote:
Really depends on your design.
The Master pages design is perfect. Then all you have to do is to change
the master page and all your pages would be changed.

Is you do not have that design then you need to go and touch every aspx
page. Since you need to modify HTML anyway to display that information.
George.
"Xavier" <Xa****@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
thanks for your replay.
My problem is - how can i simply add such a feature in a simply way to all
pages. I think something like create a new class inherited from a page
....
and then all aspx pages of the site should be inherited from this new
class
....

I did not know if this is a possible or a good concept. I did not want to
implement in each codebehind of every page manually the necesary code

Any ideas, is this possible?
thanks

"George Ter-Saakov" wrote:
Answer to Xavier:

Not sure where problem is.
Just do it.
First line in HTML.

<%
long l1 = DateTime.Now.Ticks;
%>

Last line
<%
long l2 = DateTime.Now.Ticks;
Response.Write( (l2-l1)/1000);
%>
George.


Feb 9 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.