使用Request.Params["id"]来获取参数是一种比较有效的途径。有三种方式可以进行参数传递:(1). Form (2). ?id= (3).cookierequest.params其实是一个集合,它依次包括request.querystring、request.form、request.cookies和request.servervariables。如果要在两个页面传递数据的话,只能用request.querystring、request.form、request.cookiesRequest.Params 是在 QueryString、Form、Server Variable 以及 Cookies 找数据,他首先在 QueryString 集合查找数据,如果在 QueryString 找到数据,就返回数据,如果没有找到就去 Form 集合中查找数据,找到就返回,否则在往下一下个集合查找数据。Request.Params["id"] Request.Form["id"] Request.QueryString["id"]的用法以及区别?Request.Params是所有post和get传过来的值的集合,Request.Form是取post传值, Request.QueryString是get传过来的值

内容扩充:

1、request.params怎么在两个页面传数据的! request.params其实是一个集合,

它依次包括

request.querystring

request.form

request.cookies

request.servervariables

注:顺便说一下 request.servervariables

=====================================================================

Request.ServerVariables("Url")  返回服务器地址

Request.ServerVariables("Path_Info")  客户端提供的路径信息

Request.ServerVariables("Appl_Physical_Path")  与应用程序元数据库路径相应的物理路径

Request.ServerVariables("Path_Translated")  通过由虚拟至物理的映射后得到的路径 Request.ServerVariables("Script_Name")  执行脚本的名称

Request.ServerVariables("Query_String")  查询字符串內容

Request.ServerVariables("Http_Referer")  请求的字符串內容

Request.ServerVariables("Server_Port")  接受请求的服务器端口号

Request.ServerVariables("Remote_Addr")  发出请求的远程主机的IP地址

Request.ServerVariables("Remote_Host")  发出请求的远程主机名称

Request.ServerVariables("Local_Addr")  返回接受请求的服务器地址

Request.ServerVariables("Http_Host")  返回服务器地址

Request.ServerVariables("Server_Name")  服务器的主机名、DNS地址或IP地址

Request.ServerVariables("Request_Method")  提出请求的方法比如GET、HEAD、POST等等

Request.ServerVariables("Server_Port_Secure") 如果接受请求的服务器端口为安全端口时,则为1,否则为0

Request.ServerVariables("Server_Protocol") 服务器使用的协议的名称和版本

Request.ServerVariables("Server_Software") 应答请求并运行网关的服务器软件的名称和版本

Request.ServerVariables("All_Http") 客户端发送的所有HTTP标头,前缀HTTP_

Request.ServerVariables("All_Raw") 客户端发送的所有HTTP标头,其结果和客户端发送时一样,没有前缀HTTP_

Request.ServerVariables("Appl_MD_Path") 应用程序的元数据库路径

Request.ServerVariables("Content_Length") 客户端发出內容的长度

Request.ServerVariables("Https") 如果请求穿过安全通道(SSL),则返回ON如果请求来自非安全通道,则返回OFF

Request.ServerVariables("Instance_ID") IIS实例的ID号

Request.ServerVariables("Instance_Meta_Path") 响应请求的IIS实例的元数据库路径

Request.ServerVariables("Http_Accept_Encoding") 返回內容如:gzip,deflate

Request.ServerVariables("Http_Accept_Language") 返回內容如:en-us

Request.ServerVariables("Http_Connection") 返回內容:Keep-Alive

Request.ServerVariables("Http_Cookie")

Request.ServerVariables("Http_User_Agent")

Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1;SV1)

Request.ServerVariables("Https_Keysize") 安全套接字层连接关键字的位数,如128

Request.ServerVariables("Https_Secretkeysize") 服务器验证私人关键字的位数如1024

Request.ServerVariables("Https_Server_Issuer") 服务器证书的发行者字段

Request.ServerVariables("Https_Server_Subject") 服务器证书的主题字段

Request.ServerVariables("Auth_Password") 当使用基本验证模式时,客户在密码对话框中输入的密码

Request.ServerVariables("Auth_Type") 是用户访问受保护的脚本时,服务器用於检验用户的验证方法

Request.ServerVariables("Auth_User") 代证的用户名

Request.ServerVariables("Cert_Cookie") 唯一的客户证书ID号

Request.ServerVariables("Cert_Flag") 客户证书标誌,如有客户端证书,则bit0为0如果客户端证书验证无效,bit1被设置为1

Request.ServerVariables("Cert_Issuer") 用户证书中的发行者字段

Request.ServerVariables("Cert_Keysize") 安全套接字层连接关键字的位数,如128

Request.ServerVariables("Cert_Secretkeysize") 服务器验证私人关键字的位数如1024

Request.ServerVariables("Cert_Serialnumber") 客户证书的序列号字段

Request.ServerVariables("Cert_Server_Issuer") 服务器证书的发行者字段

Request.ServerVariables("Cert_Server_Subject") 服务器证书的主题字段

Request.ServerVariables("Cert_Subject") 客户端证书的主题字段

Request.ServerVariables("Content_Type") 客户发送的form內容或HTTPPUT的数据类型

===================================================================== 如果要在两个页面传递数据的话,只能

request.querystring

request.form

request.cookies Request.Params 是在 QueryString、Form、Server Variable 以及 Cookies 找数据,

它首先在 QueryString 集合查找数据,

如果在QueryString 找到数据,就返回数据,

如果没有找到就去 Form 集合中查找数据,找到就返回,

否则在往下一下个集合查找数据。

2、Request.Params["id"]、Request.Form["id"]和Request.QueryString["id"]的用法以及区别!! Request.Params是所有post和get传过来的值的集合,Request.Form是取post传值,

Request.QueryString是get传过来的值

Request.Params用法的更多相关文章

  1. Request.Params用法,后台接收httpget参数

    使用Request.Params["id"]来获取参数是一种比较有效的途径. request.params其实是一个集合,它依次包括request.querystring.requ ...

  2. C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法

    C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法? Request.params , Request ...

  3. 说说Request.Params[key]和Request[key]

    摘要 其实你一看到,就应该会想到,这个不简单吗,不就是服务端接收参数的一种方式吗?是的.在asp.net编程中,QueryString.Form.Cookie是三种比较常见的接收客户端参数的方式.Qu ...

  4. Request.params,Request.form,Request.querystring区别(转)

    自己总结:---大致意思是: 1.传参的方式分为:get方式传参,post方式传参,request.cookies和request.servervariables 2.这几种获取参数方式获取的都是一个 ...

  5. 客户端的数据来源:QueryString, Form, Cookie Request[]与Request.Params[]

    在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie . 我们可以在HttpRequest中访问这三大对象. QueryString: 获 ...

  6. Request.url用法

    原文:Request.url用法 我們在開發網頁應用程式,時常需要去解析網址(Request.Url)的每個片段,進行一些判斷.例如說 "http://localhost:1897/News ...

  7. Asp.net中request.QueryString与request.Params的区别 【转】

    Request.Form:获取以POST方式提交的数据(接收Form提交来的数据): Request.QueryString:获取地址栏参数(以GET方式提交的数据) Request:包含以上两种方式 ...

  8. Request.Params

    在开发中有时会用到Request.Params["id"]来获取参数,那么到底是从什么地方接收参数呢? 一般情况下,有三种方式进行参数传递1.GET 方式,通过url传递,如?id ...

  9. 细说Request与Request.Params

    在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie .我们可以在HttpRequest中访问这三大对象,比如,可以从QueryStrin ...

随机推荐

  1. Linux命令之必杀绝技Vi文本编辑的使用

    vi  文本编辑器 语法:vi [参数] 文件 进入vi全屏幕编辑画面 按字母i进入[输入模式],按[ESC]转到命令行, 输入 :q可不保存退出vi :wq存盘退出vi :q!不存盘强制退出 :w ...

  2. 工厂方法模式(java 设计模式)

    1.工厂方法模式的定义 工厂方法模式使用的频率非常高, 在我们日常的开发中总能见到它的身影. 其定义为:Define an interface for creating an object,but l ...

  3. POJ2976 Dropping tests(二分+精度问题)

    ---恢复内容开始--- POJ2976 Dropping tests 这个题就是大白P144页的一个变形,二分枚举x,对a[i]-x*b[i]从大到小进行排序,选取前n-k个判断和是否大于等于0,若 ...

  4. Mysql学习(慕课学习笔记9)查询、分组

    查找记录 Select select username,id from users; Group by 进行分组 select sex from users group by sex; 分组条件 se ...

  5. Dede文章列表

    文章列表标签的使用: {dede:arclist flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheig ...

  6. (翻译玩)在使用flask-script的应用上使用gunicorn

    在使用flask-script的应用上使用gunicorn 两周前,我强烈的想要学习一点新知识,像新的语言,新的框架之类的!好让我的大脑忙碌起来,寻找了一些日子后,我决定学习现在越来越流行的云应用平台 ...

  7. AngularJS自定义表单控件

    <!doctype html> <html ng-app="myApp"> <head> <script src="G:\\So ...

  8. sql delete output

    select * into #student1 from student select * from #student1 create table #temp2( id int not null,na ...

  9. nodejs javascript微信开发

    1.当从第三方软件需要分享到微信的时候 需要给授权处理才能获得微信信息 比如 nickname 等昵称图像等 从第三方登陆跳转到微信分享页需要 shareurl = http://open.weixi ...

  10. CryEngine3教程合辑

    转载自http://tieba.baidu.com/p/3663800102 作者:Tytaa     中文名称: CryEngine游戏关卡设计训练视频教程第一季 外文名称: 3DMotive In ...