How do i check if my form has been submitted in classic ASP?
+1
A:
First, you can check, if Request.ServerVariables("REQUEST_METHOD")= "POST"
. That is, assuming, you use POST method to submit the form, the initial load will have GET method, the subsequent submits will be POST.
You can also add a hidden field in your form, if that variable is set in POST data (Request.Form
object), you will know it is a postback, otherwise it is the first load.
naivists
2010-01-24 20:00:30
Checking request method and referrer will give you something like PostBack :)
dario-g
2010-01-24 20:09:21