The page the user ends up on shouldn't be the one to actually do the emailing.
In your situation, Enter_details.asp
submits data to email.asp
, which does the emailing, and tells the user the email has been sent. Hence, if it is reloaded, both actions will be repeated.
If you leave the emailing functionality where it is in email.asp
, and when this is complete, do a Response.Redirect
to a new page emailConfirmation.asp
which simply tells the user whether the email has been sent successfully or not (you could pass a success flag, and any other details required, through to it via Querystring or Session from email.asp
).
Then, if emailConfirmation.asp
is reloaded, no duplicate emails will be sent.