Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>if(confirm('保存成功!是否繼續添加?')){location.href='ProductonAdd.aspx'}else{location.href='ProductonList.aspx'}</script>");
//後臺彈出確定框
ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert('請正確輸入!');</script>");
//ASP.NET後臺頁面跳轉
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('數據添加成功!');{location.href='ProductonList.aspx'}</script>");
或
Page.ClientScript.RegisterStartupScript(typeof(string), "", "<script>window.location.href='AdminMain.aspx';</script>");
//後臺彈出文本框ScriptManager.RegisterStartupScript(Page, typeof(string), "popUp", "window.open('rptView.aspx','打印預覽','toolbar=no,location=no,scrollbars=yes,top=200px,left=200px,width=904px,height=650px')", true);