473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to delay page redirect?

In my web application, an authenticated user can edit a lot of
personal information and then finally can click on Update/Save button
to save the info.

I did it using MultiView. When the Update or Save button is clicked,
I would like to bring up a View of the MultiView which only displays
the update progress with a spinner like this one:

http://www.mpire.com/images/sunbox_spinner.gif

And some text to the right saying something like "Your profile is
being updated...."

I would like this UpdateProgress view to stay for 5 seconds and then
either redirect to the very 1st view or output something like "Your
profile has been updated."

I was trying this through System.Threading.Thread.Sleep(5000) in the
button click handler, only to realize that http protocol is stateless,
and thus it won't work.

Right now, I am using the asp:UpdateProgress control just next to the
Update button. But, it's not nice enough.

So, if I don't wanna redirect to a different page where one can use
meta page refresh property to set the delay timemout, what can we do?
Dec 4 '07 #1
2 2626
i wrote a custom UpdateProgress which is transparent and displays on
top of everything in UpdatePanel.
using System.Threading.Thread.Sleep and then output some javascript. I
don't see why Sleep won't work
in the custom updateprogress, i register the script

Sys.WebForms.PageRequestManager.getInstance().add_ initializeRequest(....

and

Sys.WebForms.PageRequestManager.getInstance().add_ endRequest(.....

when init, the control will get the updatepanel dimensions and
position. endrequest will tell my control to execute the function
required to display the progress bar or spin gif.

On Dec 4, 12:23 pm, gnewsgroup <gnewsgr...@gmail.comwrote:
In my web application, an authenticated user can edit a lot of
personal information and then finally can click on Update/Save button
to save the info.

I did it using MultiView. When the Update or Save button is clicked,
I would like to bring up a View of the MultiView which only displays
the update progress with a spinner like this one:

http://www.mpire.com/images/sunbox_spinner.gif

And some text to the right saying something like "Your profile is
being updated...."

I would like this UpdateProgress view to stay for 5 seconds and then
either redirect to the very 1st view or output something like "Your
profile has been updated."

I was trying this through System.Threading.Thread.Sleep(5000) in the
button click handler, only to realize that http protocol is stateless,
and thus it won't work.

Right now, I am using the asp:UpdateProgress control just next to the
Update button. But, it's not nice enough.

So, if I don't wanna redirect to a different page where one can use
meta page refresh property to set the delay timemout, what can we do?
Dec 4 '07 #2
On Dec 3, 11:50 pm, Nick Chan <zzzxtr...@yahoo.comwrote:
i wrote a custom UpdateProgress which is transparent and displays on
top of everything in UpdatePanel.
using System.Threading.Thread.Sleep and then output some javascript. I
don't see why Sleep won't work

in the custom updateprogress, i register the script

Sys.WebForms.PageRequestManager.getInstance().add_ initializeRequest(....

and

Sys.WebForms.PageRequestManager.getInstance().add_ endRequest(.....

when init, the control will get the updatepanel dimensions and
position. endrequest will tell my control to execute the function
required to display the progress bar or spin gif.
Nick,

Thank you so much, but do you mind giving us more details? Especially
you left out the parameters for initializeRequest and endRequest.

Also, where do you really register the script? You said it is in the
custom UpdateProgress control. I am not sure what it is.
Dec 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeff Uchtman | last post by:
Is there any way to delay a response.redirect for say one or two seconds? Thanks Jeff
1
by: Donald Canton | last post by:
Hi all, I've got a script that caches 52 card images and displays the appropriate card based on user input. It works fine, except when the page loads for the first time the results are...
6
by: adish11 | last post by:
Hi, In Web Application I would like to create delay for 30 sec in the code to enable external process to run. During the delay in application I would like to show the user message like "Please...
0
by: Ross Dempster | last post by:
Hi everyone, this is quite involved but if anyone can help (or just likes a challenge!) i would very much appreciate it. Quick intro : I have forms based authentication (though i do it manually...
5
by: Michael D. Jones | last post by:
Hi all, I would like to have a delay on a logout page. Here is what I have so far: logout.aspx ----------- Page_Load() FormsAuthentication.SignOut(); Thread.Sleep(5000);
12
by: wizard04 | last post by:
I have a drop-down list, populated from a database, a few text boxes, and a few buttons on a page. The ddl is set to autopostback. For some reason, whenever a postback happens (when an item in...
2
by: JJ | last post by:
I used this to redirect a page after a delay of 8 seconds: this.Response.AddHeader("Refresh", "8;URL=mylocalurl") However I notice that the page I am redirected to is also refreshed again in 8...
5
by: ozman | last post by:
Hi, I'm having a problem with delaying a redirect of a page. I created a contact form and if the user does not fill in the fields, I'm echoing the message, but at the same time I want it coming...
2
by: Rahina | last post by:
I am working in Dreamweaver 8, and I have created a simple form: http://www.realmofmystery.com/app.html This is a free website I am doing for some friends, so nothing fancy. And, I learned web...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.