日期:2014-05-19  浏览次数:20914 次

if的小问题
语句如下:
if(button被按下)

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

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

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

------解决方案--------------------
Response.Write( " <script> alert(\ "删除成功!\ "); </script> ");

Response.Redirect( "index.aspx ");

改为:
Response.Write( " <script> alert(\ "删除成功!\ ");location.href= 'index.aspx '; </script> ");

//Response.Redirect( "index.aspx ");
------解决方案--------------------
加在后面不就好了嘛??

Response.Write( " <script> alert(\ "删除成功!\ ");location.href= 'index.aspx?Aname= "+Request.QueryString[ "Aname "]+ " '; </script> ");