What's going on?

W

Wayne Wengert

I have a radio button list set to autopostback. When I click on one of the
buttons in that list the SelectedIndexChanged event fires but the value of
the selected index is -1 (no selection)? How can that be?

Wayne
 
P

Peter Rilling

Are you creating these radio button dynamically like from a database. If
that is the case, then you need to initialize the list during the Init
event, otherwise the events are not dispatched. Also, some lists persist
the list of items in the viewstate which allows the server to build the list
at the appropriate time in the life cycle. You could try enabling the
viewstate for that control and then only binding to the data when it is not
a postback.
 
W

Wayne Wengert

Thanks for the response.

These are static (pre-built) lists.

How can the changed event fire if the index has not changed?

Wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top