Request. Params usage

Source: Internet
Author: User
Tags servervariables

Using request. Params ["ID"] to obtain parameters is a more effective way.

There are three ways to pass parameters: (1). Form (2 ).? Id = (3). Cookie

Request. Params is actually a set of requests. querystring, request. Form, request. Cookies, and request. servervariables.

If you want to transmit data on two pages, you can only use request. querystring, request. Form, and request. Cookies.

Request. params searches for data in querystring, form, server variable, and cookies. It first searches for data in the querystring set. If the data is found in querystring, the data is returned, if no data is found, search for data in the form set. If no data is found, return. Otherwise, search for data in the next set.

Request. Params ["ID"] request. Form ["ID"] request. querystring ["ID?

Request. Params is a set of all post and get values,

Request. form is a post-uploaded value,

Request. querystring is the value passed by get.

 

 

 

 

 

Content expansion:

1. How does request. Params transmit data on two pages!
Request. Params is actually a collection,

It includes

Request. querystring

Request. Form

Request. Cookies

Request. servervariables

Note: By the way, request. servervariables

========================================================== ==================================

Request. servervariables ("url ")
Back to server address

Request. servervariables ("path_info ")
Path information provided by the client

Request. servervariables ("appl_physical_path ")
Physical path corresponding to the application metadatabase path

Request. servervariables ("path_translated ")
Path obtained after ing from virtual to physical
Request. servervariables ("script_name ")
Script Execution name

Request. servervariables ("QUERY_STRING ")
Query string content

Request. servervariables ("http_referer ")
Request string content

Request. servervariables ("server_port ")
Server port number that receives the request

Request. servervariables ("remote_addr ")
IP address of the remote host that sends the request

Request. servervariables ("remote_host ")
Name of the remote host that sends the request

Request. servervariables ("local_addr ")
Returns the server address that receives the request.

Request. servervariables ("http_host ")
Back to server address

Request. servervariables ("SERVER_NAME ")
Host Name, DNS address, or IP address of the server

Request. servervariables ("request_method ")
Request methods such as get, Head, and post

Request. servervariables ("server_port_secure ")
If the server port receiving the request is a security port, the value is 1. Otherwise, the value is 0.

Request. servervariables ("server_protocol ")
Name and version of the protocol used by the server

Request. servervariables ("server_software ")
Name and version of the server software that responds to the request and runs the Gateway

Request. servervariables ("all_http ")
All HTTP headers sent by the client, prefixed with HTTP _

Request. servervariables ("all_raw ")
All HTTP headers sent by the client have the same results as those sent by the client without the prefix HTTP _

Request. servervariables ("appl_md_path ")
Metadatabase path of the application

Request. servervariables ("content_length ")
Length of the content sent by the client

Request. servervariables ("HTTPS ")
If the request passes through the Secure Channel (SSL), on is returned. If the request comes from an insecure channel, off is returned.

Request. servervariables ("instance_id ")
ID of the IIS instance

Request. servervariables ("instance_meta_path ")
Metadatabase path of the IIS instance that responds to the request

Request. servervariables ("http_accept_encoding ")
Returned content, such as gzip and deflate

Request. servervariables ("http_accept_language ")
Returned content, for example, en-US

Request. servervariables ("http_connection ")
Returned content: keep-alive

Request. servervariables ("http_cookie ")

Request. servervariables ("http_user_agent ")
Returned content: Mozilla/4.0 (compatible; msie6.0; windowsnt5.1; sv1)

Request. servervariables ("https_keysize ")
Number of connections in the Secure Socket Layer, such as 128

Request. servervariables ("https_secretkeysize ")
The number of bits for Server Authentication for private keywords, for example, 1024

Request. servervariables ("https_server_issuer ")
Issuer field of the server certificate

Request. servervariables ("https_server_subject ")
Topic field of the server certificate

Request. servervariables ("auth_password ")
The password entered in the Password dialog box when the Basic Authentication mode is used

Request. servervariables ("auth_type ")
When a user accesses a protected script, the server is used to verify the user's authentication method.

Request. servervariables ("auth_user ")
User Name of the Credential

Request. servervariables ("cert_cookie ")
Unique customer certificate ID

Request. servervariables ("cert_flag ")
The customer certificate is marked as a token. If a client certificate exists, bit0 is 0. If the client certificate verification is invalid, bit1 is set to 1.

Request. servervariables ("cert_issuer ")
Issuer field in the user certificate

Request. servervariables ("cert_keysize ")
Number of connections in the Secure Socket Layer, such as 128

Request. servervariables ("cert_secretkeysize ")
The number of bits for Server Authentication for private keywords, for example, 1024

Request. servervariables ("cert_serialnumber ")
Serial number field of the customer Certificate

Request. servervariables ("cert_server_issuer ")
Issuer field of the server certificate

Request. servervariables ("cert_server_subject ")
Topic field of the server certificate

Request. servervariables ("cert_subject ")
Subject field of the client certificate

Request. servervariables ("content_type ")
Form Content or httpput data type sent by the customer

========================================================== ==================================
If you want to transmit data on two pages, you can only

Request. querystring

Request. Form

Request. Cookies
Request. Params searches for data in querystring, form, server variable, and cookies,

It first searches for data in the querystring collection,

If data is found in querystring, data is returned,

If no data is found, search for data in the form set,

Otherwise, search for data in the next collection.

2. Usage and difference of request. Params ["ID"], request. Form ["ID"] and request. querystring ["ID !!
Request. Params is a set of all post and get values. Request. form is a post value,

Request. querystring is the value passed by get.

 

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.