Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
563 views
in Technique[技术] by (71.8m points)

asp classic - ASP check request method

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...