[; XX"&QUOT]到Request.Form请求之间的区别[" XX"]

[; XX"&QUOT]到Request.Form请求之间的区别[" XX"]

问题描述:

有请求之间的任何差别[XX] VS的Request.Form [XX]

我试图弄明白。

前者如 XX 中是否存在将返回一个值查询字符串表格缓存 ServerVariables 集合。它会经过每一个反过来,直到它找到一个值,此时它会回来。

The former will return a value if xx exists in the QueryString, Form, Cookies, or ServerVariables collections. It will go through each one in turn till it finds a value, at which point it will return.

请参阅href=\"http://msdn.microsoft.com/en-us/library/system.web.htt$p$pquest.item.aspx\" rel=\"nofollow\">索引上 的Htt prequest

See the documentation on the indexer of HttpRequest.

总之,如果你有一个?XX = 123 查询字符串,并使用请求[XX] ,字符串123将被退回,无论是 XX 的关键现有的表格集合

In short, if you have a ?xx=123 on the query string, and you use Request["xx"], the string "123" will be returned, regardless of an xx key existing in the Form collection.