내 웹 페이지에 과 panels
두 개가 있습니다. 라디오 버튼 1을 변경했을 때 패널 1을 선택하고 라디오 버튼 2를 선택하고 변경했을 때 패널 2를 숨길 때 패널 2를 표시해야합니다. panel1.라디오 버튼을 사용하여 패널 표시 및 숨기기
이 내가 여기
내 라디오 버튼에 상관 성공했던 방법입니다 : 이것은 RadioButton1_CheckedChanged됩니다
<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"/>
:
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
효과적으로 작동하려면 Autopostback을 true로 설정해야합니다. – JonH