How to: Respond to a User Selection in a RadioButton Web Server Control Group
When the user selects acontrol, the control raises an event that you can respond to.
You might not need to respond directly to the selection event of a RadioButton control at all. You respond to the event only if it is important to know when the user has made a change to the selection in a radio button group.
If you are only interested in knowing which radio button is selected, and not whether selection has changed, you can simply test radio button selection after the form has been posted to the server. For details about determining which RadioButton control is selected, see How to: Set and Get the Selection in a RadioButton Web Server Control.
Because each RadioButton server control is a separate control, each can raise an event individually; the radio button group does not raise an event as a whole.
To respond to a selection in a RadioButton control
Create an event handler for the control'sevent.
By default, the CheckedChanged event does not immediately cause the Web Forms page to be posted to the server. Instead, the event is raised in server code the next time the form is posted, as when aWeb server control is clicked. To have the CheckedChanged event cause an immediate posting, set the RadioButton control's property to true.
The following code example shows how you can respond when a user selects a RadioButton control.
Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) _ Handles RadioButton1.CheckedChanged Label1.Text = "You selected Radio Button " & RadioButton1.Text End Sub