asp-classic – 请求与Request.QueryString

这两个在VBScript中有什么区别?
Request("startDate")

Request.QueryString["startDate"]

请求(“startDate”)在哪里记录?我在这里看不到这个用法

http://www.w3schools.com/asp/asp_ref_request.asp

解决方法

ASP经典中的Request对象的官方文档如下: http://msdn.microsoft.com/en-us/library/ms524948%28VS.90%29.aspx

引用这个问题的相关部分:

All variables can be accessed directly by calling Request(variable)
without the collection name. In this case,the Web server searches the
collections in the following order:

  • QueryString
  • Form
  • Cookies
  • ClientCertificate
  • ServerVariables

If a variable with the same name exists in more than one collection,
the Request object returns the first instance that the object
encounters.

编辑:AnthonyWJones对这个问题做了一个很好的评论:避免使用Request(“name”)语法.事实上,这在上面的文档链接中提到:

It is strongly recommended that when referring to members of a
collection the full name be used. For example,rather than
Request.(“AUTH_USER”) use Request.ServerVariables(“AUTH_USER”). This allows the server to locate the item more quickly.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....