Hello All,
Let me try to explain my situation.
I have two pages that manipulate a database. I'll call them Page 1 and Page 2. Page 1 creates a recordset and performs some logical tests on the data. It is then posted to Page 2 which performs database manipulation based on the results of the logical tests that occured in Page 1.
The logic is working just fine 99% of the time. However, if the user uses the back button to get to Page 1, (instead of the on page navigation), I have a problem. Since the cached version of Page 1 was written based upon the logical tests that occured when it loaded, and since Page 2 added data to the DB that will change the logical test, Page 1 is now invalid. If the user posts Page1 again, duplicate data is added to the DB.
Example
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
---
Page 1 Initial Load----Logical Test = True
User Makes Chages and Submits Form --- Posts to Page2
Code in Page2 Manipulates DB --- Makes Logical Test From Page 1 False
User uses back button to return to Page 1 --- Cached version written based on Logical Test being true, but it was made false by our user in the earlier step--OOPS!
User Posts Page again--Duplicate Record is added to the DB
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----
So my question is, how can I make Page1 expire when the user navigates to it using the back button?
Start Free Trial