Search This Blog

Saturday 25 June 2016

How to show the message and redirect to other page in ASP.NET

// Method 1
ScriptManager.RegisterStartupScript(thisthis.GetType(), "redirect""alert('Alert Message'); window.location='" + Request.ApplicationPath + "Nextpage.aspx';"true);

// Method 2
Response.Write("<script>alert('Alert Message')</script>");
Response.Write("<script>window.location.href='" + Request.ApplicationPath + "Nextpage.aspx" + "';</script>");

No comments:

Post a Comment