public IActionResult Index() { var vm = new FlipScript.ViewModels.Home.Index(); if (HttpContext.Request.Cookies.ContainsKey("gitHubUrls")) { string cookie = HttpContext.Request.Cookies["gitHubUrls"]; var cookieUrls = cookie.Split(new string[] { "----" }, StringSplitOptions.None); vm.PreviousUrls = cookieUrls.ToList(); } else { vm.PreviousUrls = new List<string>(); } return View(vm); }
public IActionResult Index() { var vm = new FlipScript.ViewModels.Home.Index(); if (HttpContext.Request.Cookies.ContainsKey("gitHubUrls")) { string cookie = HttpContext.Request.Cookies["gitHubUrls"]; var cookieUrls = cookie.Split(new string[] { "----" }, StringSplitOptions.None); vm.PreviousUrls = cookieUrls.ToList(); } else { vm.PreviousUrls = new List <string>(); } return(View(vm)); }