Maintain position of web part in asp.net
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 ap开发者_JAVA技巧proach to maintain the web part position for that particular user.
I think that there are 2 basic ways.
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.
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.
精彩评论