Formhandler. asp
<Html>
<Body>
<%
Dim RequestMethod
RequestMethod = Request. ServerVariables ("REQUEST _ METHOD ")
'ObtainREQUEST_METHODValue,And store it into local variables..WhenWebPage marked by FormActionParameter call time, REQUESTMETHODIsPost.Other times,Enter the address directly in the browser.,Refresh page,Or click a link on the page to call the page, REQUEST_METHODThe value isGet.
If RequestMethod = "GET" Then
'CheckREQUEST-METHODValue. IfThe structure contains a block code that is executed when the condition is true.,ContainsElseBlock,Executed when the condition is false.Refresh page.
%>
Oh,You cannot refresh and browse the current content on the screen.!If you want to change the form data,Use the back key to return to the form.,Or return by submission.
<% Else
%>Welcome to dancing with the wind!
'Press the submit 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>