Why does the refresh panel deselect the current selection in the list when choosing another?

I have an asp: ListBox wrapped inside an asp: UpdatePanel. The list contains the entire United States. For example, if I select Alaska and then scroll down to select Wyoming, the list moves to the top of the list instead of staying in Wyoming, and it deselects Alaska, but Wyoming remains selected. Has anyone encountered this before?

+1


source to share


1 answer


It looks like you have an autorepeat list set up. This explains the jumps when a page or partial page (inside your refresh panel) is reloaded.



As far as deselecting the default (Alaska) is concerned, this is the default behavior. Only 1 option can be selected by clicking (even if you have SelectionMode set to multiple). To select multiple options, if enabled, you need to press Ctrl-Click. This is browser / OS behavior that you do not directly control.

+1


source







All Articles