-1

why this code is not working........
here iam givin two radio buttons.
if first one is selected one text box is displayed.
if second is selected one text box is displayed .
here my coding is given below please correct it........

If yes.Checked Then
            nicstaff = "Y"
        ElseIf no.Checked Then
            nicstaff = "N"
        End If

 Protected Sub yes_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles yes.CheckedChanged
        If yes.Checked = True Then
            empname.Visible = True
            empname.SelectedItem.Text = "selected"
        End If
    End Sub

    Protected Sub no_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles no.CheckedChanged
        If no.Checked = True Then
            requestedby.Visible = True
            requestedby.Text = "selected"
        End If
    End Sub

  <asp:RadioButton id="yes" Text="Yes" GroupName="nicstaff" checked="true" runat="server"/>&nbsp;
                    <asp:RadioButton id="no" Text="No" GroupName="nicstaff" runat="server"/>

please help me urgent.............

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by mail2saion
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.