コード例 #1
0
        public ActionResult Index()
        {
            Response.Write("Method Get <br>");
            // set a couple of form values
            BigWebFormModel bigWebForm = new BigWebFormModel();

            bigWebForm.PersonId     = 6;
            bigWebForm.IsSeaHawkFan = true;
            return(View(bigWebForm));
        }
コード例 #2
0
 public ActionResult Index(BigWebFormModel bigWebForm)
 {
     Response.Write("Method Post <br>");
     ViewBag.message = bigWebForm.FName + " is a " + bigWebForm.Gender + " who lives in " + bigWebForm.StateAbbr + " and was born " + bigWebForm.BirthDate.ToShortDateString() + ". PersonId: " + bigWebForm.PersonId + " IsSeaHawkFan: " + bigWebForm.IsSeaHawkFan;
     return(View(bigWebForm));
 }