Link to home
Start Free TrialLog in
Avatar of ewang1205
ewang1205

asked on

make radio button list dynamic

I have a radio button which has lists of country and state and city.  I like to change to a button to country and state in one condition and then change to country and state and city in other condition.  How to do this?  Thahks.
Avatar of mcgants
mcgants

You can make the radio button automatically post back to the server by selecting the control and making AutoPostBack = True

You can then add an event handler to the radio button as follows:
  Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged

  End Sub

or to a list:
  Private Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged

  End Sub

Depending on which button is clicked, you can then update other radio buttons

Hope this helps,
mcg
Avatar of ewang1205

ASKER

I only have one radio button.  But, I like the list of the radio button to change dynamically. Thanks.
Sorry but I don't understand what you mean when you say 'the list of the radio button' - list isn't a command or feature of radio button,
Max
What I mean is the listitems of one list.  For example, a list has two items:  Country and City.  How to dynamically change the list to three items:  Country, State and City?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of mcgants
mcgants

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