[求助]如何用radiobutton制DropDownList的控可用性???<form id=Form1 method=post runat="server">
          <asp:radiobutton id=c1 runat="server" GroupName="c"></asp:RadioButton>
          <asp:radiobutton id=c2 runat="server" GroupName="c"></asp:RadioButton>
      <asp:DropDownList ID="cc1" runat="server">
<asp:ListItem value="1">1</asp:ListItem>
<asp:ListItem value="2">2</asp:ListItem>
      </asp:DropDownList>
             <asp:DropDownList ID="cc2" runat="server">
<asp:ListItem value="3">3</asp:ListItem>
<asp:ListItem value="4">4</asp:ListItem>
      </asp:DropDownList>
</form>codebehind为vb,当选取button是页面不刷新。
当选c1时两个DropDownList全为disable
当选c2时cc2为disable
如何实现啊???
一看问题就知道我是新手,请各位高手们说得详细一点,thank u~~~~~~~~~~~~~~~~~~~~

解决方案 »

  1.   


    <form id="Form1" method="post" runat="server">
    <asp:radiobutton id="c1" runat="server" GroupName="c" AutoPostBack="True"></asp:radiobutton>
    <asp:radiobutton id="c2" runat="server" GroupName="c" AutoPostBack="True"></asp:radiobutton>
    <br>
    <asp:DropDownList ID="cc1" runat="server">
    <asp:ListItem value="1">1</asp:ListItem>
    <asp:ListItem value="2">2</asp:ListItem>
    </asp:DropDownList>
    <asp:DropDownList ID="cc2" runat="server">
    <asp:ListItem value="3">3</asp:ListItem>
    <asp:ListItem value="4">4</asp:ListItem>
    </asp:DropDownList>
    <asp:DropDownList id="dropTest" style="Z-INDEX: 101; LEFT: 296px; POSITION: absolute; TOP: 240px"
    runat="server"></asp:DropDownList>
    </form>aspx.vb 中加如下代码Private Sub c2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles c2.CheckedChanged
            If c2.Checked Then
                cc1.Enabled = True
                cc2.Enabled = False
            End If
        End Sub    Private Sub c1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles c1.CheckedChanged
            If c1.Checked Then
                cc1.Enabled = False
                cc2.Enabled = False
            End If
        End Sub
      

  2.   

    能不刷新webform实现吗??????