From: http://www.cnblogs.com/qyz123/archive/2006/12/11/589221.html
Difference between request. querystring ("ID") and request ("ID ")
If you encounter a problem twice a day, copy it for your reference. Generally, the omnipotent request ("ID") is
Asp is not afraid to upload Class 2.2. When uploading files, you can use Request. QueryString to pass the parameters to the Save page. querystring
First turn a text paragraph, right?
In the background asp program, it is very easy to obtain the ASCII
The request itself is a static object of the system and can also be called as an array. For exampleRequest ("abc") is to obtain the value corresponding to the "abc" in the request array. This array is not fixed, but a set of multiple arrays,
ASP. form, both methods can obtain the parameter values passed by the page form. I have never noticed the difference between the two methods. I generally like to use the form of request ("ABC, simple and clear.
Recently I modified some kingcms code.
ASP. form, both methods can obtain the parameter values passed by the page form. I have never noticed the difference between the two methods. I generally like to use the form of request ("ABC, simple and clear.
Recently I modified some kingcms code.
When we use request. querystring today, we find that all received strings are garbled as long as they contain Chinese characters. After research, I finally found the cause.
ASP. NET uses UTF-8 encoding by default, and we generally use gb2312
Request. Form: Get the data submitted in post mode (receive the data submitted by form );
Request. querystring: Get the address bar parameters (data submitted in get Mode)
Request: contains the preceding two methods (obtain the data submitted by the
In form submission, the difference between ASP. NET get and post methods is as follows:
1. Get is to get data from the server, and post is to send data to the server.
2. Get is to add the parameter data queue to the URL referred to by the Action
If you encounter a problem twice a day, copy it for your reference. Generally, the omnipotent request ("ID") is better.
The request reads data from several sets in order. The order from the beginning to the end is querystring, form, and
Request. querystring ["ID"] can only read parameters named ID passed by parameters in the address bar.Request ["ID"] is a composite function for reading data.Its priority isQuerystring> form> cookies> servervariablesThat is to say, if the address
The request reads data from several sets in order. The order from the beginning to the end is querystring, form, and servervariables. The request object searches for the variables in these sets in order of this order. If there is any matching
Request. Params
14:02:22 | category: Asp.net| Label: | large font size, small/medium subscription
Request. Params is actually a set of requests. querystring, request. Form, request. Cookies, and request. servervariables.
If you want to transmit
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.
For the relationship between the table structure, the Chinese parameter data needs to be transmitted in the URL. The problem is as follows:
1. http: // localhost/test. aspx? Lanmu = "book", using request. querystring ["lanmu"], obtained "book,
When the form on the page is sent to the page in the get mode, please [/url] for data (if the data contains unsafe characters, then, the browser converts the string to a hexadecimal character before transmitting it. For example, if a space is
Request. Form: Get the data submitted in post mode (receive the data submitted by form );
Request. querystring: Get the address bar parameters (data submitted in get Mode)
Request: contains the preceding two methods (obtain the data submitted by
Request. Form: obtain the data submitted in post mode.
Request. querystring: Get the parameters in the address bar (data submitted in get mode ).
Request: contains the preceding two methods (obtain the data submitted by the get method first),
A lot of people use the SA when publishing the database, plus "select .. where name = "+ request. querystring ["name"]: How is the result ?!
[For details about the length, check the specific commands]
Change the value of request. querystring ["name"]
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.