Exemplo n.º 1
0
        public ActionResult SendMessage(ContactPage currentPage, ContactPageFormData formData)
        {
            var model = ContactPageViewModelBuilder.Create(currentPage);

            if (ModelState.IsValid)
            {
                // Do your magic here to send the message as you see fit, for instance using https://sendgrid.com

                // Then display the "thank you"-message
                return(View("ThankYou", model));
            }

            model.FormData = formData;
            return(View("Index", model));
        }
Exemplo n.º 2
0
        public override ActionResult Index(ContactPage currentPage)
        {
            var model = ContactPageViewModelBuilder.Create(currentPage);

            return(View(model));
        }