当前位置: 代码迷 >> ASP.NET >> if的小疑点
  详细解决方案

if的小疑点

热度:4666   发布时间:2013-02-26 00:00:00.0
if的小问题
语句如下:
if(button被按下)

{
//执行
Response.Write( " <script> alert(\ "删除成功!\ "); </script> ");

Response.Redirect( "index.aspx ");
}

他就直接到了index.aspx页面,没有“删除成功”的提示“。
我想要的是先提示删除成功,在转到index页面,该如何写??

------解决方案--------------------------------------------------------
if(button被按下)

{
//执行
Response.Write( " <script> alert(\ "删除成功!\ ");window.location= 'index.aspx ' </script> ");

Response.End();
}
------解决方案--------------------------------------------------------
跟上面一样
Response.Write( " <script> alert(\ "删除成功!\ ");window.location = \ "index.aspx?Aname= "+Request.QueryString[ "Aname "] + "\ " </script> ");
  相关解决方案