I have a web application that allows a user to search on some criteria, select an object, edit it and then return to the previous search. All the editing takes place on a separate page linked to the datagrid of returned results. I was wondering what is the best way to store the previous search parameters so that when they return to the grid they have the same search they previously used. The best option I came up with is to use a NameValue collection of each of the selected paramters and store that to Session or a cookie when the user presses the search button. Any other ideas as to a better way to approach this?
Share
In our app, we have dozens of lists with search fields. We’ve designed a simple utility class that generates a unique string based on the current Page and stores it in the session.
This allows us to store the search field without having to maintain a NameValue collection every time we add a new page.