Asp.net Request object

Source: Internet
Author: User

The Request object actually operates the HttpRequest class in the System. Web namespace. When the customer sends a Request to execute the ASP. Net program, the CLR will encapsulate the client Request information in the Request object. These request information includes the request Header, basic client information (such as browser type, browser version number, user language)
And the encoding method), request methods (such as PosT and GET), parameter names, parameter values, and so on.
Some information contained in a request RequeM is as follows:
Connection: Keep-Alive Accept :*/*
Accept-Encodng: gzip deflate
AccePt-Language: 2h-cn
Cookie: A5PSessionId = 52qc 2i rpxyovuoexh k2x 2kqt
Host: Localhost
User 1 Agent: Mozilla 2 llla/4.0 (comPatible; NSIE 60b: Wlndows Nt 5.0 ;...)
The Request object is called as follows:
Request. Collectlon ["VariabLe"]
The Cotle canopy includes four types of collections: QueryString, ForM, Cookies, and SeverVaiables. The C0ollection can be omitted here. That is to say, both Request ["Variable"] and Request. Collection ["Variable"] are allowed. If Collection is omitted, the Request object will be searched in the order of QueryString, ForM, Cookies, and SeverVaiables until the keyword indicated by Variable is found and its value is returned. If no value is found, the return value is Null ).
To optimize the execution efficiency of the program, it is recommended that you use collection. If you search too much, the execution efficiency of the program will be reduced.

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.