开发者

Whether to persist or not persist number of results per page. If we want to persist, how to persist

In our application we are using ASP.NET MVC. On a page we are displaying 10 results per page by default. We want to let the user change this default value of 10 to 20 or 30 or 40. When it is changed, is it good to persist this changed value? To me it looks good to persist the value so that user does not have to change it every time.

My other question is if we decide to persist the value, is it good persist

  1. in the session.
  2. on client side using cookie.
  3. on server side in both session and database.

EDIT:

I know it is driven by application r开发者_如何转开发equirements to some extent. I want to know what is the practice that others follow.


I think it can be good to persist this value, at least for the session. It really depends; do you have other paged data that would use such a value, too? and would it make sense for the same changed value to be used for the others? If so, you need to persist it somewhere.

I would tend to prefer a cookie for this one, I think; either session or reasonably persisted. But if it's something that you think would be useful for the person to have that setting persisted all the time, perhaps storing it in a user profile (in a DB, that is) could be helpful.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜