I'm trying to find a solution to a problem I'm facing with an ASP.NET application (C# / MySQL Backend).
The application uses webforms in a multi step wizard to insert data into a SQL database, the various steps are javascript driven so no 'submit' is done until the 'last' step. In certain circumstances anyway if the user click the browser 'back' button just after the 'last' step the form is resubmitted and the SQL INSERT is triggered again creating dupes of the original record.
I tought to use an Ajax based mechanism to track the steps of the form until the wizard reach the 'last' step. After that trough the same Ajax function I will prevent the resubmit of the form preventing dupes.
I don't want to use javascript tricks to disable the back button for obvious reasons.
The main problem of this solution is that I don't like it so much and it will also be quite difficult to implement since wizards on the application form are quite articulated and this may cause some problem.
Is there a 'best practice' to prevent such issues without building complex infrastructures?
I'm not posting code because I think it will be misleading and unnecessary.
Best regards, Mike