tim
tim

Reputation: 1369

asp.net disabling listbox on postback

I have a asp.net listbox. A master-detail view. When the selectionchanges on the listbox, controls on an update panel update. All working fine. Now if the user arrows through the listbox selections I get like a million postbacks. Ideally (for UX) it would be great to cancel the previous postback. But what I tried was on the PageRequestManager.add_initializeRequest: disable the listbox with jquery so the user cannot make another selection. Then on add_endRequest enable the listbox. The boss does not like the disabled look for a couple of seconds.

Can someone think of a better way for me to handle this? I tried changing the color while disabled but could not find a way.

Upvotes: 0

Views: 529

Answers (1)

Ken D
Ken D

Reputation: 5968

Use Ajax ModalPopupExtender, you can show a progress bar or simply a spinner icon for informing the user that the server is busy doing his/her last operation. The ModalPopupExtender disable all page controls till finishing the operation.

This is the official control page. And this is an example from Matt Berseth, he uses it for editing but the concept is the same.

Upvotes: 1

Related Questions