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

问一个简单的问题,希望大家能帮帮我,对我来说很重要,谢谢回答的人
我的button里的click事件里写了
  protected   void   ImageButton10_Click(object   sender,   ImageClickEventArgs   e)
        {
                Response.Write( " <script> window.open( 'http://post.baidu.com ') </script> ");
               
        }
实现跳转的时候打开新页面,但是跳转后虽然新页面打开了,但是它还是显示在当前的页面,就是说A页面里button点击后打开新页面B,但是还是显示在A页面,我想实现点击button后打开B页面后显示在B页面,请问该怎么实现呢?谢谢了

------解决方案--------------------
看不大懂你说的
试试看这是不是你要的。。。
Response.Redirect(url);

------解决方案--------------------
Response.Write( " <script> window.open( 'http://post.baidu.com ', '_blank ') </script> ");
------解决方案--------------------
顶楼上的
------解决方案--------------------
protected void ImageButton10_Click(object sender, ImageClickEventArgs e)
{
Page.RegisterStartupScript( " ", " <script> window.open( 'http://post.baidu.com ') </script> ");

}
------解决方案--------------------
protected void ImageButton10_Click(object sender, ImageClickEventArgs e)
{
Response.Write( " <script> window.open( 'http://post.baidu.com ', ' ', ' ') </script> ");

}

这样就可以了 ,呵,不能省

------解决方案--------------------
Response.Write( " <script> window.open( 'http://post.baidu.com ', '_blank ') </script> ");
加个参数就可以了_blank 在新页面打开
_self在当前页面打开

------解决方案--------------------
wdx2008(夜雨寒窗) ( ) 信誉:100 Blog 加为好友 2007-5-14 13:05:55 得分: 0
Response.Write( " <script> window.open( 'http://post.baidu.com ', '_blank ') </script> ");
加个参数就可以了_blank 在新页面打开
_self在当前页面打开

他的方法可以呀
Response.Write( " <script> window.open( 'http://post.baidu.com ', '_self ') </script> ");





------解决方案--------------------
你的意思是 弹出新页对吧。。 没试这个吗

wdx2008(夜雨寒窗) ( ) 信誉:100 Blog 加为好友 2007-5-14 13:05:55 得分: 0
Response.Write( " <script> window.open( 'http://post.baidu.com ', '_blank ') </script> ");
加个参数就可以了_blank 在新页面打开
------解决方案--------------------
LZ浏览器问题