开发者

Suggest something for storing history

i have a ajaxified list page 开发者_如何学Pythonshowing some list of items i am using a user control for filtering the content of the list page there are multiple filters in the user control what i want is if a user applied more than one filter than navigate to other page and press the back button the applied filters should be there in active state. can any one please suggest me something how to achieve this.


You should put the filters in the query string because:

(1)It's not secret data.

(2)When user click "back" button of the browser, of course he wants the list is well-filtered, instead of that he need to filter the list again. Also sometimes he may copy the url in the address bar and sent it to others.

Format the filters' info in a proper way, e.g. "filter1=name&filter2=price", and deal with the query string in Page_Load if there is a filter.


One way is using cookies.

Store the values in a cookie, and read them back with javascript when the user hits the back button.

Or use the querystring like @Danny says. Why didn't I think of that right away :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜