Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

radiobutton

in asp.net this is not deciding which radiobutton item is clicked

 If RadioButtonList1.Items(0).Enabled = True Then
            TextBox1.Text = "hello"
        ElseIf RadioButtonList1.Items(1).Enabled = True Then
            TextBox1.Text = "hello2"
        End If
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

try

 If RadioButtonList1.Items(0).Checked= True Then
            TextBox1.Text = "hello"
        ElseIf RadioButtonList1.Items(1).Checked = True Then
            TextBox1.Text = "hello2"
        End If
Avatar of jagguy

ASKER

this gives me an error as there is no checked property?

 If RadioButtonList1.Items(0).Checked= True Then
            TextBox1.Text = "hello"
        ElseIf RadioButtonList1.Items(1).Checked = True Then
            TextBox1.Text = "hello2"
        End If
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial