|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Response.Redirect
Hi, I know this question has been asked before but I am unable to make much out of the previous thread. Thats why I am asking again.<br><br>I have a password change page. Now in this page when a password change is successful, I first display a confirmation of the password change and I also want to notify the user that the page will be redirected in 10 seconds. Now I don't know how to redirect the page after a delay (or how to add the delay). Please help me out. Your help is greatly appreciated.<br><br>Thanks a lot.
|
|
#2
|
|||
|
|||
|
The easiest thing to do if you are going to use a delayed redirection is to output a bit of javascript into an <asp:Literal> tag. The script I use for these forums when you log out is ...<br><div class="msgQuoteWrap"><div class="msgCode"><br><script language=javascript><br><!--<br> // this does the redirection...<br> function pageBounce() {<br> window.location.href='/forum';<br> }<br><br> // uses the javascript timer function setTimeout().<br> // 1750 is the time in ms before calling the <br> // pageBounce() function<br> setTimeout('pageBounce()', 1750); <br>//--><br></script><br></div></div><p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
|
#3
|
|||
|
|||
|
in c# : Sleep(10000) before the redirect command.
|
|
#4
|
|||
|
|||
|
You don't really want to use the Sleep(). It will freeze the entire thread for that period, which could quickly lead to performance problems on your server.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Response.Redirect |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|