예제 #1
0
        // GET: Home
        public ActionResult Index()
        {
            var myHomeViewModel = new HomeViewModel();

            myHomeViewModel.Persons = new List<PersonModel>();
            myHomeViewModel.Persons.Add(new PersonModel { Name = "Frank", Checked = false });
            myHomeViewModel.Persons.Add(new PersonModel { Name = "Joe", Checked = false });
            myHomeViewModel.Persons.Add(new PersonModel { Name = "Sue", Checked = false });
            myHomeViewModel.Persons.Add(new PersonModel { Name = "Mike", Checked = false });

            return View(myHomeViewModel);
        }
예제 #2
0
 public ActionResult Submit(HomeViewModel result)
 {
     return View("Index", result);
 }