Response.Write("<script>alert(\"请输入查询条件!\");</script>");
            return;
在执行这段代码以后,页面的控件大小和位置发生了变化(主要是checkboxlist控件的大小位置和TABLE的总尺寸),导致页面不美观。请问如何在运行上面代码后,页面控件的TABLE的布局都不发生变化?

解决方案 »

  1.   

    ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('请输入查询条件!');", true);用这一句来弹出警告就没事了~
      

  2.   

    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "alert(\"请输入查询条件!\");"); ");
      

  3.   


    Page.RegisterStartupScript("MSG", "<script language='javascript' for='window' event='onload'>alert('请输入查询条件!');</script>");
      

  4.   

    Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
    Response.Write(" <script>alert(\"请输入查询条件!\"); </script>");
    -----------------------------------------------------------------
    这样试试看。