Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, August 19, 2016 10:41 PM
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!
All replies (4)
Tuesday, August 23, 2016 5:03 AM âś…Answered
Hi,
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).
Grz, Kris.
Monday, August 22, 2016 3:59 AM
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.
Monday, August 22, 2016 10:38 AM
Hi,
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?
Grz, Kris.
Monday, August 22, 2016 9:16 PM
Thanks. Once a user logs in I need to carry their registration ID throughout all pages and always have it available.