M
Matt
Hi,
Here's my problem. I'm working on a site where customers can buy
tickets for events. Let's take the example where in webform1.aspx, the
customer enter all its personal information. Then when he clicks a
button to register and go to the next step, i enter the personal
information in the database and redirect to let's say webform2.aspx.
Once in webform2, if the user go back to webform1 with his browser's
back button and clicks on the button in webform1 again, this will add
another record in the database.
To fix this problem i just added the new customer id in a Session
variable when the user registers for the first time. So if he goes
back then clicks on the button again, i will update his profile
instead of creating a new, duplicated record.
However in the admin part of the site, the administrator can create
multiple new registrations at the same time, in different browser
windows. Different windows yes, but still the same session! Which
means that the customer id stored in Session is being replaced.
I'm looking for a way to store the id without conflicts if there are
different windows open for the same session. Is there a way to
retrieve a unique id for each browser window? Ex:
Session[UniqueIdOfWindow.ToString() + "CustomerId"] = 5;
Or any other way to share a value between pages. Hidden fields or
query strings won't work, since this problem happens when the user
clicks on the back button of his browser, so there is no way to send
hidden fields values or parameters in the url. Any idea would be
appreciated. Thanks!
Matt
Here's my problem. I'm working on a site where customers can buy
tickets for events. Let's take the example where in webform1.aspx, the
customer enter all its personal information. Then when he clicks a
button to register and go to the next step, i enter the personal
information in the database and redirect to let's say webform2.aspx.
Once in webform2, if the user go back to webform1 with his browser's
back button and clicks on the button in webform1 again, this will add
another record in the database.
To fix this problem i just added the new customer id in a Session
variable when the user registers for the first time. So if he goes
back then clicks on the button again, i will update his profile
instead of creating a new, duplicated record.
However in the admin part of the site, the administrator can create
multiple new registrations at the same time, in different browser
windows. Different windows yes, but still the same session! Which
means that the customer id stored in Session is being replaced.
I'm looking for a way to store the id without conflicts if there are
different windows open for the same session. Is there a way to
retrieve a unique id for each browser window? Ex:
Session[UniqueIdOfWindow.ToString() + "CustomerId"] = 5;
Or any other way to share a value between pages. Hidden fields or
query strings won't work, since this problem happens when the user
clicks on the back button of his browser, so there is no way to send
hidden fields values or parameters in the url. Any idea would be
appreciated. Thanks!
Matt