I have a form that has 3 submit buttons. They all call the same .asp file, but different information is processed depending on which button is pressed. Is there a way for me to check which button was pressed using the QueryString?
Here's the code I'm currently trying, but I am getting an error on the server:
Code:
On Error Resume Next
For each item in Request.QueryString()
If item = "submitIt" Then
ObjSendMail.To = Request.QueryString("SupEmail")
ObjSendMail.Subject = "foobar"
ObjSendMail.From = Request.QueryString("ReqEmail")
body = "blah"
ElseIf item = "approveIt" Then
ObjSendMail.To = "Christian.Grise@usa.dupont.com
ObjSendMail.Subject = "bar"
ObjSendMail.Cc = Request.QueryString("ReqEmail")
ObjSendMail.From = Request.QueryString("SupEmail")
body = "blahdy"
ElseIf item = "denyIt" Then
ObjSendMail.To = Request.QueryString("ReqEmail")
ObjSendMail.Subject = "foo"
ObjSendMail.From = Request.QueryString("SupEmail")
body = "blah blah"
End If
Next
Any help will be greatly appreciated. Thank you in advance.
Christian