我想用两个RadioButton控制两个Panel的显示。当选中一个RadioButton时设一个Panel的Visible属性为true.当选中另一个RadioButton时设另一个Panel的Visible属性为true. 两个Panel不能同时为True

解决方案 »

  1.   

    把RadioButton的AutoPostBack属性设置成true,然后在RadioButton的CheckedChanged方法里写相应的代码
      

  2.   

    那样的话用RadioButtonList不更好吗?
    smaple
    if (RadioButtonList.SelectedIndex() == 0)
    {
    }
    else
    {
    }
      

  3.   

    if (RadioButtonList.SelectedIndex() == 0)
    {
      pane1.visable=true;
       pane2.visable=false;
    }
    else
    {
    pane1.visable=false;
       pane2.visable=true;}
      

  4.   

    建议楼主用javascript做。。效果更佳。