Request,request.params,request.querystring,request.form in C #

Source: Internet
Author: User

If you want to pass data on two pages, you can only use Request.QueryString, Request.Form, Request.Cookies

Request.params is looking for data in QueryString, Form, Server Variable, and Cookies, he first looks up data in the QueryString collection, and returns data if the data is found in QueryString, To find the data in the Form collection if it is not found, return it, or find the data in the next collection.


request.params["id"], repuest["id"
request.querystring["id"]
What is the use and difference of request.form["id"?
Request.params is a collection of all post and get-pass values, Request.Form is a post-pass value, and Request.QueryString is a get-pass-along value

When I looked at this question, I saw that there was an interesting question asked. He asked whose value the request.params["id", request["id" was taken if post and get or even cookies passed the value of the ID's parameter. If you look at it carefully, you should understand. The request is to sequentially query the values in these collections if this is already present in the previous set, he will return this value. You will not be able to inquire whether or not he is behind you.

What are the usages and differences between request.params["id", request.form["id", and request.querystring["id"?

Request.params is a collection of all post and get-pass values, Request.Form is a post-pass value, and Request.QueryString is a get-pass-along value

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.