Ejemplo n.º 1
0
 public ActionResult JsonAction()
 {
     Person person = new Person
     {
         FirstName = "Fernando",
         LastName = "Alonso",
         DateOfBirth = DateTime.Parse("1981-07-29")
     };
     return Json(person,JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 2
0
        public ActionResult Temp()
        {
            Person person = new Person
            {
                FirstName = "Fernando",
                LastName = "Alonso",
                DateOfBirth = DateTime.Parse("1981-07-29")
            };

            return View("Details",person);
        }
Ejemplo n.º 3
0
        public ActionResult Details()
        {
            ViewData["team"] = "Ferrari";
            ViewBag.Country = "Spain";
            TempData["points"] = 207;

            Person person = new Person
            {
                FirstName = "Fernando",
                LastName = "Alonso",
                DateOfBirth = DateTime.Parse("1981-07-29")
            };

            return View(person);
        }