Get session ID

using System.Web.SessionState

HttpSessionState ss = HttpContext.Current.Session;
HttpContext.Current.Session["test"] = "test";
TextBox1.Text = ss.SessionID;

原文地址:https://www.cnblogs.com/greencolor/p/1669961.html