我的页面本来是居中的,但是按了button提交后,整个页面向左移动了,不居中了。要怎么样才能在提交后任然居中?

解决方案 »

  1.   

    是否使用了response.write
    使用clientscript
      

  2.   

    button提交事件 最下面写上Response.Write("<script type=\"text/javascript\">location.href=location.href;</script>")
      

  3.   

     是的用了response.write,下面是代码:
    protected void Button2_Click(object sender, EventArgs e)
        {
             Response.Write(" <script> window.open( 'chat_online.aspx?id=" + number+ "') </script> ");
        }
    clientscript  这个怎么用?