Last post Aug 23, 2016 05:03 AM by XIII
Aug 19, 2016 10:41 PM|DarrenDG|LINK
What is the best way to make sure that when a person opens up a browser and logs in twice in the same browser that it isn't using the same session data. I have a user that keeps doing this and it overwrites data because based on the user that is being passed
around in the session data. For instance they pull up 2 different customer records and the customer id is in session data, and then one browser overwrites the other customer. Thanks!
Aug 22, 2016 03:59 AM|RanjeetAulakh|LINK
I am not sure if i got your question right
I will recommend never use Session to pass values between pages until unless it is absolute necessary
And in your case you can just use query string parameter to pass CustomerId when user go to edit customer page.
If you use session .Then it will be shared among different browser tabs.So do not put it in session
If you are trying to have 2 login sessions for Same website in same browser it is not recommended again .
Try to do that for any website like fb gmail you are not allowed because it is not recommended.
Aug 22, 2016 10:38 AM|XIII|LINK
they pull up 2 different customer records and the customer id is in session data, and then one browser overwrites the other customer
I would suggest you take this data out of session state and put the ID of the record in your page in a hidden field or via querystring. Upon posting the changes the correct ID can be retrieved via form data or querystring to make the adjustments for that
specific record in the database.
Is there a specific reason why you want to keep such data in session state?
Aug 22, 2016 09:16 PM|DarrenDG|LINK
Thanks. Once a user logs in I need to carry their registration ID throughout all pages and always have it available.
Aug 23, 2016 05:03 AM|XIII|LINK
Once a user logs in I need to carry their registration ID throughout all pages and always have it available
Then session or a cookie would be ok. Actually the person would be able to keep multiple tabs open and edit different records when needed as you only update your database for that record and make use of the registrationid to audit who has changed what when
(also keep the last modified date).