Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP check request method

Tags:

asp-classic

How do i check if my form has been submitted in classic ASP?

like image 899
Gabriel Avatar asked Jan 24 '10 19:01

Gabriel


1 Answers

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.

like image 77
naivists Avatar answered Nov 21 '22 04:11

naivists