asp.net delay before response redirect

Tom picture Tom · Nov 9, 2010 · Viewed 18k times · Source

Is it possible to delay the response.redirect in an asp.net page by 5 seconds?

something like delay.response.redirect("myURL.aspx")

I need to run a jquery animation before the page redirects.

I don't want to use meta refresh if I can help it but if that's the only way or the best way then please let me know.

thanks

Answer

Jorge picture Jorge · Jun 4, 2013
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "click", "alert('Cliente cadastrado com sucesso.'); setTimeout(function(){window.location.href ='../../Default.aspx'}, 3000);", true);