views:

35

answers:

1

I have created a web part in asp.net application and allowed user to change it position. Now, I want that once user comes back he/she will see the same setting of web part that he/she had left earlier.

What is the best approach to maintain the web part position for that particular user.

A: 

I think that there are 2 basic ways.

  1. To set a cookie on every user and then connect that cookie with the preference of the user on a server database, eg one is the position that have set on this web part. Every time your user make some action like that you save the new preference on the database.

  2. The second way is to store this information on cookie, but this have some limitations. You can not store many data on cookie and you must know that in every page you load them. There is an optimization on that that you can limit some data on one only page using the directory on the cookie option. Also you must aware here for error readings or for cookie change by hand for hacking purpose.

Aristos