Panel containing RadioButtonList does not recognize default button

298 views Asked by At

I have multiple controls within a panel. The last control within the panel is a radio button list. The panel has a default button of "Submit", located outside of the panel on tha page. The page with which the panel is embedded has a couple additional buttons. When I make the radio button selection and press my Enter key, the "Submit" button is not fired, but the first button on the page. So what is it about a RB that makes it different enough from a text box or DDL that it won't recognize a panel's default button? Is there a way to force the RB to use the default?

Thanks.

1

There are 1 answers

0
FlyingBlind On

I have a workaround, as I still do not understand why the radio button works this way. (I even created a test project with similar controls and didn't have this problem.) First, I set this property on all of my buttons preceding Submit:UseSubmitBehavior="false". This will then essentially make my Submit button the go-to, as far as the browser is concerned.

Of course with the defaultButton removed completely, this caused other problems with a drop down list I also had in the panel. When I took away the defaultButton, I could not longer hit and still have the Submit function work. So I needed to keep the defaultButton for the panel. There are other posts regarding UseSubmitBehavior, but I never made this connection.