我们如何找到特定会话变量的Seesion ID? [英] How can we Find the Seesion id for the paticular session variable?
本文介绍了我们如何找到特定会话变量的Seesion ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在锻炼自我,在课上有疑问.
当我们处理会话时,每个会话都会生成一个唯一的ID.因此我想查找并显示每个会话变量的每个唯一ID.
代码是这样的……
在.cs文件中
Hi,
i am training my self and i have a doubt in sessions.
When we are working with sessions,each session have an unique ID generated. so I want to find and display that Each unique Ids for the each session variable.
Code is like this......
in .cs file
protected void Page_Load(object sender, EventArgs e)
{
Session["test1"] = "hai";
Session["test2"] = "hello";
Response.Write("the general unique id is :"+Session.SessionID +"</br>");
Response.Write("here i want to display the session[test1] id"+"</br>");
Response.Write("here i want to display the session[test2] id");
}
预先感谢,
Balu.
Thanks in advance,
Balu.
推荐答案
我认为这是您所需要的. http://forums.asp.net/t/1249045.aspx/1 [ ^ ]
I think this is what you need..
http://forums.asp.net/t/1249045.aspx/1[^]
这篇关于我们如何找到特定会话变量的Seesion ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文