Active Server Pages Programming (ASP)/Send Mail based on Form Value - Only Once!
Expert: Srini Nagarajan - 10/5/2005
QuestionHello Srini,
I've been racking my brains over this one. I have a Classic ASP edit form with many fields, one of them a Status drop-down. If the Status (option value) has been changed to "Pending" for instance, I do a objMail.send, otherwise it doesn't send. No problem, but how can I prevent the mail from sending AGAIN if a user goes back to the page and updates another field, or even just refreshes the page? If it helps, I am updating a SQL Server 2000 database. Any help sure would be appreciated.
Thanks in advance, BW
Answerhi
Sorry for the delay! i thought i replied for all my pending questions...
Okay, what you can do is store the old values into Session when user press Update button compare the values.. If the values changes send email and make a flag.. until user in that session you can prevent sending mail..
Happy Programming!
-Srini