This is a migrated thread and some comments may be shown as answers.

Using the browser back button

1 Answer 71 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Andrew Ryan
Top achievements
Rank 1
Andrew Ryan asked on 11 Dec 2009, 08:40 PM
Is there anyway to get a dual listbox configuration to remember where list items are when the user uses the browser back button?

In the use case where you're using a dual list box say, for picking output columns on a search - it can get pretty frustrating for the user to click back and find that both the columns he selected and the order of said columns have been lost.

When I wrote my own dual list box javascript component (before Telerik came out with theirs), I wrote an entry every time a field moved into a hidden field. I had a method on the body load that read the hidden field and repositioned the items whenever the page was loaded, except for the first time. Since hidden fields will stay put on a postback, this is a reliable way of pulling back a users selections and order when the back button is pressed.

Does anyone else feel me on this?

Andrew

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 14 Dec 2009, 09:34 PM
If you are binding the control you can always set this change to happen automatically through the aspx declaration. You could also set up some custom logic in the transferring event and save the transferred events in session or something like that. The best solution would be to databind this and have a transfer be reflected in whatever the control is bound to.
Tags
ListBox
Asked by
Andrew Ryan
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or