request.querystring和session之间的区别 [英] difference between request.querystring and session

查看:135
本文介绍了request.querystring和session之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

request.querystring和session之间的差异是什么,何时使用它们的条件

解决方案

Request.QueryString是查询字符串,意味着传入的值在网址之后。 http://www.mysite.com/page.aspx?id=1&catid=5



id = 1&catid = 5是查询字符串。



会话是存储在服务器上的内存(通常),只能通过C#或服务器端代码访问。


Request.QueryString ()用于将信息从一个页面传递到另一个页面,最终用户在地址URL中完全可见。

会话值存储在IIS内存中。



我的建议是:当应用程序需要安全传输数据时,请使用Session。

当不需要安全性时,可以使用Request.QueryString()


查询字符串与会话变量 [ ^ ]

Request.querystring vs Session - Google [ ^ ]



希望它有所帮助! :)

What is diff between request.querystring and session and when , which condition they are used

解决方案

Request.QueryString is the query string, meaning the values passed in after the url. http://www.mysite.com/page.aspx?id=1&catid=5

id=1&catid=5 is the querystring.

Session is something stored in memory (usually) on the server that you can only get access to in C# or server side code.


Request.QueryString() is used to pass information from one page to another page,which is totally visible to end user in Address url.
Session values are stored in the IIS memory.

My Suggestion is:When application to need transfer data securly,then use Session.
When security is not needed then you can use Request.QueryString()


Query String vs. Session Variable[^]
Request.querystring vs Session - Google[^]

Hope it helps! :)


这篇关于request.querystring和session之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆