Пример #1
0
        /// <summary>
        /// GetSession
        /// </summary>
        /// <param name="context"></param>
        /// <param name="Key"></param>
        /// <returns></returns>
        public static object GetSession(HttpContext context, string Key)
        {
            Key = WebConfig.GetAppSettingsString("SystemPreFix") + Key;

            return(context.Session[Key]);
        }
Пример #2
0
        public static void SetCache(HttpContext context, string Key, object Value)
        {
            int appSettingsInt = WebConfig.GetAppSettingsInt("CacheSeconds", 0);

            SetCache(context, Key, Value, appSettingsInt);
        }
Пример #3
0
        /// <summary>
        /// ClearSession
        /// </summary>
        /// <param name="context"></param>
        /// <param name="Key"></param>
        public static void ClearSession(HttpContext context, string Key)
        {
            Key = WebConfig.GetAppSettingsString("SystemPreFix") + Key;

            context.Session.Remove(Key);
        }