Пример #1
0
        public ActionResult Child(ChildModel model)
        {
            if (ModelState.IsValid)
            {
                // 成功
                var result = new ContentResult()
                {
                    Content = "Success"
                };
                return(result);
            }

            return(View(model));
        }
Пример #2
0
        public ActionResult Child()
        {
            var model = new ChildModel();

            return(View(model));
        }