Sunday, November 23, 2014

asp.net get value from session

  public object GetFromSession(string key)
        {
            if (HttpContext.Current == null || HttpContext.Current.Session == null)
            {
                return null;
            }
            return HttpContext.Current.Session[key];
        }

No comments:

Post a Comment