. Net basic learning (1): difference between request and request. Form

Source: Internet
Author: User
In. Net learning and development, the basics are important. Now I will summarize some of the most basic. Net knowledge to learn more.

In the process of webpage development, we need to accept the value from the page, which is also the basic content we need to know.
Use request. Form. asp searches from the form set.
With request, ASP searches in the following order:
1. querystring
2. Form
3. Cookies
4. clientcertificate
5. servervariables
If the same variable name in the same form exists in querystring, the value in form is not returned, but in querystring.

Request. Form: obtain the data submitted by the front-end form in post mode.
Request. querystring: Get the address bar parameters (data submitted in get Mode)
Request: contains the preceding two methods (obtain the data submitted by the get method first)

In addition to the different receipt methods, the two also have the problem of transferring the data volume:

the request. Form method can receive no limit on data, while request. querystring can only receive data smaller than 2 kb. Of course, the latter is faster than the former.
generally, the request. querystring method is used to request a query from a database, because there are only a few keywords in the query, and the request. Form method is not required, resulting in slow query speed.
In addition, the request. querystring method displays data in the address bar of the client browser, which is less secure.
the request. Form method does not have the preceding problem. Therefore, it is widely used for data submission and user login in multiple text fields.
the request object may not specify the specific querystring or form method, for example, request ("variable"), because it can be automatically recognized.
however, it is better to specify the parameter. Otherwise, it also takes a few minutes to determine the access time, affecting the execution efficiency of the Program .

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.