Exemple #1
0
        public IActionResult Index()
        {
            CookieMgrService.Set("user_is_admin", "true", 1, true);

            ViewData["user_is_admin"] = true;

            return(View());
        }
Exemple #2
0
 protected void SetCookieValue(string key, string value, int?expireTime, bool isEssential)
 {
     CookieMgrService.Set(key, value, expireTime, isEssential);
 }
Exemple #3
0
        protected string GetCookieValue(SessionValues key)
        {
            string value = CookieMgrService.Get(key.ToString());

            return(value);
        }
Exemple #4
0
 protected void SetCookieValue(SessionValues key, string value, int?expireTime, bool isEssential)
 {
     CookieMgrService.Set(key.ToString(), value, expireTime, isEssential);
 }
        private string GetCookieValue(string key)
        {
            string value = CookieMgrService.Get(key);

            return(value);
        }