Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have in each aspx a filter part which include different types of controls(textbox,radiobutton,checklist...) And when user change the value of any control in filter body this new value will be saved as default for current user and when close the session or rendering the page this new values will be set as default for this page...btw this application contains about 50 aspx page and not prefered to use cookie .can output page caching can solve this problem??? Or will be pending on the current browser? Thanks in advance
Posted

1 solution

I would suggest to have a UserPreference table in database with UserId as unique column. and have a button on page "Save Preferences".

Then on click of that, just do an Ajax call and update the table for that User.
 
Share this answer
 
v2
Comments
Youssra Mehanna 27-Sep-15 18:08pm    
adit thanks for your reply...i think this will affect the performance as each time the page will be reload i have to hit the database to get the default value of filter body which is a part of page
This won't affect your performance much because you must be hitting the database while page is loaded. You just need to add another record to the result to get the preference. For one user, you will get one record, so that is easy and clean.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900