重定向前显示消息框

时间:2017-09-06 12:15:56

标签: c# asp.net

我想提示用户该交易是成功的。但是这里发生的事情是在消息框有机会立即显示页面重定向到其他页面之前?我应该使用什么代码?

1 个答案:

答案 0 :(得分:0)

您必须先显示警告:

ScriptManager.RegisterStartupScript(this,this.GetType(),"redirect",
"alert('Time OutAlert'); window.location='" + 
Request.ApplicationPath + "Nextpage.aspx';",true);