public ActionResult CategoryProduct(int id = 0) { //devam edicez if (id > 0) { HttpCookie cookie = new HttpCookie("Category"); cookie["CategoryID"] = id.ToString(); cookie.Expires = DateTime.Now.AddDays(15); Response.Cookies.Add(cookie); return(View(productmanagement.GetCategoryProduct(id))); } else { return(RedirectToAction("Index", "Home")); } }