目的:点击checkbox控件达到使页面有的窗口出现有的窗口隐藏,自动刷新页面,怎么实现?谢谢

解决方案 »

  1.   

    CheckBox1.AutoPostBack=trueprivate void CheckBox1_CheckedChanged(object sender, System.EventArgs e)
    {
    if(this.CheckBox1.Checked)
    {
    this.CheckBox2.Checked=true;
    }
    else if(!this.CheckBox1.Checked)
    {
    this.CheckBox2.Checked=false;
    }
    }
      

  2.   

    if (this.CheckBox1.Checked)
            {
                      this.DropDownList1.Visible = false;
            }
    为什么我无论是否选中,效果一样,看不差别呢?
    CheckBox1的AutoPostBack属性已经设为true.
      

  3.   

    if(!this.IsPostBack)
    {
    this.CheckBox1.AutoPostBack=true;
    if (this.CheckBox1.Checked)
            {
                      this.DropDownList1.Visible = false;
            }
    else
    {
    this.DropDownList1.Visible=true;}}
      

  4.   

    还是不行啊,dropdownlist的内容没有变化