Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Delay Page Request Load

Reply
Thread Tools

Delay Page Request Load

 
 
MCM14
Guest
Posts: n/a
 
      07-20-2010
I need to simply delay the loading of a requested page by 5 seconds. I'm not
that that familiar with threading, so I just want to confirm that what I am
doing is correct please.

In the Load Sub for the page, I have the line:

System.Threading.Thread.Sleep(5000)

I want to make sure that this will only halt the loading of this particular
page - but that other requests to the application will not be stalled. Is
that correct? Or if not, how can I do so?

Thanks.

 
Reply With Quote
 
 
 
 
Harv
Guest
Posts: n/a
 
      07-20-2010
On Jul 20, 1:58*pm, "MCM14" <(E-Mail Removed)> wrote:
> I need to simply delay the loading of a requested page by 5 seconds. I'm not
> that that familiar with threading, so I just want to confirm that what I am
> doing is correct please.
>
> In the Load Sub for the page, I have the line:
>
> System.Threading.Thread.Sleep(5000)
>
> I want to make sure that this will only halt the loading of this particular
> page - but that other requests to the application will not be stalled. Is
> that correct? Or if not, how can I do so?
>
> Thanks.


I think a Timer might be a better solution for your pause.
 
Reply With Quote
 
 
 
 
MCM14
Guest
Posts: n/a
 
      07-21-2010
Why would a Timer be better? Does pausing the thread do something
particularly negative?


"Harv" wrote:

> On Jul 20, 1:58 pm, "MCM14" <(E-Mail Removed)> wrote:
> > I need to simply delay the loading of a requested page by 5 seconds. I'm not
> > that that familiar with threading, so I just want to confirm that what I am
> > doing is correct please.
> >
> > In the Load Sub for the page, I have the line:
> >
> > System.Threading.Thread.Sleep(5000)
> >
> > I want to make sure that this will only halt the loading of this particular
> > page - but that other requests to the application will not be stalled. Is
> > that correct? Or if not, how can I do so?
> >
> > Thanks.

>
> I think a Timer might be a better solution for your pause.
> .
>

 
Reply With Quote
 
MCM14
Guest
Posts: n/a
 
      07-21-2010
I actually do want the loading of this particular page to be slow. It is a
"print view" popup, and because of some weird AJAX & popup blocker & Session
State issues, I need this page to pause loading for a few seconds to ensure
that the data gets successfully uploaded by the AJAX function.

Anyway, none of that matters for this discussion. My goal is simply to pause
the loading of this one page request without pausing any of the other
processing in the application for other page requests and processes.


"Brian Cryer" wrote:

> "MCM14" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I need to simply delay the loading of a requested page by 5 seconds. I'm
> >not that that familiar with threading, so I just want to confirm that what
> >I am doing is correct please.
> >
> > In the Load Sub for the page, I have the line:
> >
> > System.Threading.Thread.Sleep(5000)
> >
> > I want to make sure that this will only halt the loading of this
> > particular page - but that other requests to the application will not be
> > stalled. Is that correct? Or if not, how can I do so?

>
> What are you after when you say you want to delay loading of the page? If
> you put a sleep in the page_load then when someone navigates to the page
> then will have to wait an extra 5 seconds for the page to load, which will
> mean that the page will seem VERY slow. Is that what you want? (I can see
> reasons during development why you might perhaps want this but not on a
> customer facing site.)
>
> Or do you want a timer (as suggestd by Harv) on a different page which will
> delay forwarding to this page?
> --
> Brian Cryer
> http://www.cryer.co.uk/brian
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Javascript function upon Page Load from Page Load event handle Matcon ASP .Net 3 05-28-2008 05:15 PM
Calculating propagation delay & transmission delay Stone Cisco 1 09-27-2006 06:26 PM
when debugging long delay before hitting breakpoint in page load =?Utf-8?B?RENDLTcwMA==?= ASP .Net 5 01-09-2006 01:51 PM
Page Load and webcontrol page load venky ASP .Net 5 07-11-2005 03:16 PM
What Causes the Page Load Delay Wayne Wengert ASP .Net 3 03-31-2005 03:58 AM



Advertisments