我的网页上有两个radio buttons
和两个,当广播按钮1检查更改并隐藏面板2时panels
,我想show
面板1,同样,当播放按钮2检查更改并隐藏面板1时,需要显示面板2。
这就是我没有成功的方式
这是我的单选按钮:
<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