Example #1
0
        public ActionResult Index()
        {
            Response.Cache.SetOmitVaryStar(true); //加上这个,才是稳定的304状态码;否则,状态码无规律

            var employee = new Employee() { ID = 1, Name = "ares", Gender = "Male", Birthday = DateTime.Now };
            return View(employee);
        }
Example #2
0
 public ActionResult Index4()
 {
     var employee = new Employee() { ID = 1, Name = "ares", Gender = "Male", Birthday = DateTime.Now };
     return View("Index", employee);
 }