关于asp.net中的会话 [英] about sessions in asp.net

查看:59
本文介绍了关于asp.net中的会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个问题.不是将数据放入多个会话变量中,而是将其放入单个会话变量中.
有什么不同或只有相同.

哪一个更可取...



i have question.Instead of taking data into multiple session variables, take it into a single session variable.
is there any difference or same only.

which one is more preferable...

推荐答案

如果使用单个会话变量,将如何存储数据?通过串联?如果是,那么您想在应用程序中的每一次和任何地方进行串联并解析值吗?

因此,请使用多个会话变量.
If you use single session variable, how will you store data? by concatenation? If yes then you want to do concatenation & parse the values every time & everywhere in your application?

So use multiple session variables.


范围没有区别-完全取决于您对它们的处理方式.
如果您打算在信息方面花很多钱,那么这是个坏主意.
看一下MSDN:它可以帮助您做出决定. http://msdn.microsoft.com/en-us/library/z1hkazw7 (v = vs.71).aspx [
There is no difference in terms of scope - it depends entirely on what you do with them.
If you are planning on stroign lots on info, then it is a bad idea.
Have a look at MSDN: it may help you decide. http://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.71).aspx[^] It covers Session, as well as cookies and view state storage.


这篇关于关于asp.net中的会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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