获得 SessionID
2015-12-20 11:00:01 访问(1873) 赞(0) 踩(0)
/// <summary>
/// 获得 SessionID
/// </summary>
/// <returns></returns>
public static string GetSessionID()
{
if (HttpContext.Current == null
|| HttpContext.Current.Session == null)
return "未知";
return HttpContext.Current.Session.SessionID;
}
/// <summary>
/// 获得 SessionID
/// </summary>
/// <param name="hc"></param>
/// <returns></returns>
public static string GetSessionID(HttpContext hc)
{
if (hc == null
|| hc.Session == null)
return "未知";
return hc.Session.SessionID;
}
标签:
获得 SessionID 


上一条:
下一条:
相关评论
发表评论