我希望仅在选择单选按钮时出现文本框。我尝试使用 RadioButtonList 但我无法让它工作,所以我使用了单独的单选按钮。但是,它没有用。这是代码:
Protected Sub radItem_CheckedChanged(sender As Object, e As EventArgs) Handles radItem.CheckedChanged
If radItem.Checked = True Then
radClient.Checked = False
radUser.Text = False
btnSearch.Visible() = True
txtSearch.Visible() = True
End If
End Sub
Protected Sub radUser_CheckedChanged(sender As Object, e As EventArgs) Handles radUser.CheckedChanged
If radUser.Checked = True Then
radItem.Checked = False
radClient.Text = False
btnSearch.Visible() = True
txtSearch.Visible() = True
End If
End Sub
Protected Sub radClient_CheckedChanged(sender As Object, e As EventArgs) Handles radClient.CheckedChanged
If radClient.Checked = True Then
radItem.Checked = False
radUser.Text = False
btnSearch.Visible() = True
txtSearch.Visible() = True
End If
End Sub
我很确定无论如何都有一种非常有效的方法。