public IActionResult Index()
        {
            var model = new SimpleFormVm();

            model.RememberMe = true;
            return(View(model));
        }
        public IActionResult SubmitWithRoute(SimpleFormVm model)
        {
            var submitVm = new SimpleFormSubmitVm
            {
                Data   = model,
                Method = "Route/Post"
            };

            return(View("Submit", submitVm));
        }
        public IActionResult SubmitWithPost(SimpleFormVm model)
        {
            var submitVm = new SimpleFormSubmitVm
            {
                Data   = model,
                Method = Request.Method
            };

            return(View("Submit", submitVm));
        }
示例#4
0
        public IActionResult SubmitWithGet(SimpleFormVm model)
        {
            var submitVm = new SimpleFormSubmitVm
            {
                Data   = model,
                Method = "GET"
            };

            return(View("Submit", submitVm));
        }