Tuesday, April 22, 2014

How to show message and redirect to other pages on page loads in asp .net?

StringBuilder strScript = new StringBuilder();
            strScript.Append("<script language=JavaScript>");
            strScript.Append("alert('Some of the product(s) in this Order are not available now. Click OK to continue this order without these product(s)?'); location.href='Home/index'</script>");
            ClientScript.RegisterStartupScript(this.GetType(), "Pop", strScript.ToString());

No comments:

Post a Comment