Webページに2つと2つあり、ラジオボタン1が変更されたときにパネルradio buttons1を表示して、パネル2を非表示にします。同様に、ラジオボタン2が変更されたときにパネル2を表示して、パネル1を非表示にします。panelsshow
これは私が成功しなかった方法です
これが私のラジオボタンです:
<asp:RadioButton ID="RadioButton1" runat="server" Text="Text" ForeColor="White" GroupName="selection" OnCheckedChanged="RadioButton1_CheckedChanged"/>
<asp:RadioButton ID="RadioButton2" runat="server" Text="Image" ForeColor="White" GroupName="selection" OnCheckedChanged="RadioButton2_CheckedChanged"/>
これはRadioButton1_CheckedChangedです:
If RadioButton1.Checked = True Then
RadioButton2.Checked = False
Panel1.Visible = True
Panel2.Visible = False
End If
これはRadioButton2_CheckedChangedです:
If RadioButton2.Checked = True Then
RadioButton1.Checked = False
Panel1.Visible = False
Panel2.Visible = True
End If