using System.Web.SessionState
HttpSessionState ss = HttpContext.Current.Session;
HttpContext.Current.Session["test"] = "test";
TextBox1.Text = ss.SessionID;
using System.Web.SessionState
HttpSessionState ss = HttpContext.Current.Session;
HttpContext.Current.Session["test"] = "test";
TextBox1.Text = ss.SessionID;
转载于:https://www.cnblogs.com/greencolor/archive/2010/02/20/1669961.html