The difference between Request.Form () and request ()

Source: Internet
Author: User

Request.Form: Gets the data submitted by post (receives the data submitted by the Form);
Request.QueryString: Gets the Address bar parameter (data submitted in get mode)
Request: Contains both of the above methods (the first to get the data submitted by get mode), it will be in QueryString, Form, servervariable search again.
And sometimes they get different results. If you only need one of the data in the Form, but you use the request instead of the Request.Form, then the program will be searched again in querystring and ServerVariable. If you have the same name in your querystring or servervariable, you will not get the value you originally wanted.

Values are passed between pages, where values are passed from one page to another, and a request () can be used to receive values on another page. In the page incoming value, that is, the form value is submitted to itself page, in its own page script can use Request.Form () to receive the value

1.request.form method, which is used to receive form variables (POST method)
The 2.request.querystring method, which is the Get method that receives the URL parameter
3.Request objects can also not specify the specific use of QueryString or form method, such as request ("variable"), because it can be automatically recognized, but it is still indicated as good, otherwise it will take a bit of time to determine its own, affecting program execution efficiency. Request: Contains both of the above methods (the first to get the data submitted by get mode), it will be in QueryString, Form, servervariable search again.
In addition to the receiver method, there is also the problem of transmitting the data size, the Request.Form method can receive no limit to the data, and request. QueryString can only receive less than 2KB of data, although the latter is faster than the former. Requests are generally used to request queries to the database. QueryString method, because the query is only a few key words, there is no need to use the Request.Form method to cause the query slow. In addition, request. The QueryString method also displays data information in the client browser address bar, which is less secure. The Request.Form method does not have the above problem, so a large number of applications in multiple text fields to submit data and user landing occasions

The difference between Request.Form () and request ()

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.