Formhandler. asp
<Html>
<Body>
<%
Dim RequestMethod
RequestMethod = Request. ServerVariables ("REQUEST _ METHOD ")
'Get the value of REQUEST_METHOD and store it in a local variable. when the Web page is called by the form-marked Action parameter, the value of REQUESTMETHOD is Post. in other cases, you can directly enter the address in the browser, refresh the page, or click a link on the page to call the page. The value of REQUEST_METHOD is Get.
If RequestMethod = "GET" Then
'Check the value of REQUEST-METHOD. If structure contains a block code, executed when the condition is true, contains an Else block, and is executed when the condition is false. Refresh the page.
%>
Oh, you cannot refresh and browse the current content on the screen now! If you want to change the form data, use the back key to return to the form, or press submit to return.
<% Else
%> Welcome to dancing with the wind!
'Press the form submission button to display.
<%
= Request. Form ("Name ")
%>.
<P> your favorite domestic car:
<% DIM favCaramre
FavCaramre = Request. Form ("Caramre ")
If favCaramre = "OLYMPUS" Then
Response. Write ("Oh, please wait! ")
Response. Write ("<P> A <B> OLYMPUS </B>? ")
Else
Response. Write (favCaramre & ". <P> great! ")
End If
%>
<% End If %>
</Body>