How can I modify an ASP page referenced by a form?

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.