当前位置: 代码迷 >> ASP.NET >> 弹出"保存成功"后转向另外一个网页如何做
  详细解决方案

弹出"保存成功"后转向另外一个网页如何做

热度:8162   发布时间:2013-02-26 00:00:00.0
弹出"保存成功"后转向另外一个网页怎么做?
C# code
protected void btnSave_Click(object sender, EventArgs e){    string script = @"<script language=javascript type=text/javascript>alert('保存成功')</script>"    Response.Redirect("~/Modify.aspx",false);}


这样做直接转向Modify.aspx页面,并没有弹出"保存成功"对话框。
请问如何实现弹出"保存成功"对话框后再转向Modify.aspx页面(这两个操作要在一个事件中完成。)

------解决方案--------------------------------------------------------
C# code
protected void btnSave_Click(object sender, EventArgs e) {    this.ClientScript.RegisterStartupScript(typeof(string),"success","alert('保存成功');window.location.href='Modify.aspx';",true);}
------解决方案--------------------------------------------------------
探讨
C# code
protected void btnSave_Click(object sender, EventArgs e)
{
this.ClientScript.RegisterStartupScript(typeof(string),"success","alert('保存成功');window.location.href='Modify.aspx';",true);
}

------解决方案--------------------------------------------------------
探讨
C# code
protected void btnSave_Click(object sender, EventArgs e)
{
this.ClientScript.RegisterStartupScript(typeof(string),"success","alert('保存成功');window.location.href='Modify.aspx';",true);
}
  相关解决方案