Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", " <script >alert( '保存成 '); location.href='新增页面';</script >"); 
这样不行吗

解决方案 »

  1.   

    我知道上面的可以,但是我要用
    IWorkItem item = AuthorizationManager.GetNewWorkItemsOfUserAndTargetObject(manager.GetRootId(), typeof(InsuranceProductAddGatherWorkItem)); 
                 if (item != null) 
                 {                  ((InsuranceProductAddGatherWorkItem)item).GotoAddGather();//这是跳转新增页面              }  
    跳转到新页。还有没有其它的解决办法
      

  2.   

    Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "  <script  >alert(  '保存成  '); location.href= '新增页面 '; </script  >"); 
    这样不就OK???
    一样的道理 !!
      

  3.   

    Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "  <script  >alert(  '保存成  '); location.href= '新增页面 '; </script  >");  
    应该说这样的比上面的更好
      

  4.   

    //message是提示的信息,url是跳转到的页面地址
    public static void ShowAndRedirect(string message, string url)
            {
                #region
                string js = @"<Script language='JavaScript'>
                        alert('{0}');location.href('{1}')
                      </Script>";
                js = string.Format(js, message, url);
                HttpContext.Current.Response.Write(js);
                #endregion
            }
      

  5.   

    //message 提示信息
    //url 转向的地址
        //先弹出对话框,然后再转页
        public void MsgBox(string message, string url)
        {
            ClientScriptManager cs = Page.ClientScript;
            // 定义名称和脚本类型. 
            String csname1 = "PopupScript";
            Type cstype = this.GetType();        // 检查脚本是否已经完成. 
            if (!cs.IsStartupScriptRegistered(cstype, csname1))
            {
                String cstext1 = "alert('" + Server.HtmlEncode(message) + "');window.location='" + url + "';";
                cs.RegisterStartupScript(cstype, csname1, cstext1, true);
            }
        }
      

  6.   

    Response.Redirect("新增页面");
    你看下可以不?