I am trying to figure out why this code doesn\'t fire the radio button change event.
here\'s the ASP page code for 2 radio buttons
You'll need to specify the attribute and value AutoPostBack="true" in order to tell ASP.NET that changing of that element should trigger a postback. It should be applied to each individual RadioButton which you wish to cause a postback.
You should add the AutoPostBack=True
attribute to both controls.
You should set the AutoPostBack = True and in the code behind the handles in your function.
Example:
Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
I would use RadioButtonList
instead. And set AutoPostBack=true
for what you want to do.
you have to specify the AutoPostBack=True
for both controls