I am using following code to display message while updating in update panel
string jv = "alert('Time OutAlert');";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "msg", jv, true);
It works fine.
But when I use Redirect after it it loads the page without displaying the message. I want user to see the message and after clicking on "ok" it should redirect.
string jv = "alert('Time OutAlert');";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "msg", jv, true);
Response.Redirect("~/Nextpage.aspx");
Display the alert with javascript and then do the redirect with the same:
ScriptManager.RegisterStartupScript(this,this.GetType(),"redirect",
"alert('Time OutAlert'); window.location='" +
Request.ApplicationPath + "Nextpage.aspx';",true);