.net - Session Variable Mismatch Between Postback -
i'm storing session variable use pass parameter various data access calls. variable set when session first created, , can changed user depending on resources have access to. instance, when user first logs in default session value might set "1". in top corner of page dropdownlist of options have access , changing changes session variable... 1, 2, 3, 4... etc.
the problem session variable may change between postbacks due 1 of following reasons:
- session timeout, causes session recreate default value of 1
- user opens 2 tabs/browser windows , changes on 1 tab, switches other page rendered using "1" value
this causes controls on page become "stale" , postbacks don't behave correctly. button click event relied on session variable in event handler may not "intended" event, , interface misleading.
what i'd able determine if session variable's value has changed between postbacks, , if has redirect same page causing re-render using new session variable value, , giving user clear indication each postback does.
any ideas?
why don't use cookie instead store variable? think both of problems addressed that.
Comments
Post a Comment