Thursday, February 11, 2016

MVC Important

MVC Important


 Caching

 [OutputCache(Duration = int.MaxValue, VaryByParam = "none")]
        public ActionResult Index()
        {
            Thread.Sleep(5000);
            return View();
        }

 [OutputCache(Duration = int.MaxValue, VaryByParam = "id")]
        public ActionResult Index(int id,string message)
        {
            Thread.Sleep(5000);
            return View();
        }

--------------------------------------------
Page Navigation
return Redirect("http://www.website.com");
 return RedirectToAction("Index", "Home");

No comments:

Post a Comment

Sql server row level policy