Session
HttpContext.Current.Session["varName"];
<pre lang="cs">using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Web.SessionState; /// <summary> /// Summary description for Class1 /// </summary> ///IRequiresSessionState enable session in Class file public class Class1:IRequiresSessionState { public Class1() { // // TODO: Add constructor logic here // } public void getSession(string key) { if (HttpContext.Current.Session[key] != null) { string sessionID= HttpContext.Current.Session[key].ToString(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)