读书人

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

发布时间: 2012-04-12 15:46:35 作者: rapoo

弹出"保存成功"后转向另外一个网页怎么做?

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);
}

读书人网 >asp.net

热点推荐