当你的程序【asp.net】后台用的是Session验证登录的时候,如果你想输入Session里所有的键值对时,可以用下面的程序:
System.Collections.IEnumerator SessionColl = HttpContext.Current.Session.GetEnumerator();
while (SessionColl.MoveNext())
{
string SessionName = SessionColl.Current.ToString();
if(SessionName=="你要的id名")
{
//执行你的操作。
}
}
|