public ActionResult GetFormPartial(string email, string name) { ContactFormViewModel newMessage = new ContactFormViewModel(); newMessage.Email = email; newMessage.Name = name; newMessage.LoggedIn = User.Identity.IsAuthenticated; newMessage.AmazonID = User.Identity.Name; return PartialView("_ContactFormPartial",newMessage); }
public JsonResult ContactForm(ContactFormViewModel newmessage) { var response = newmessage.SendForm(); var data = new { message = "Message Sent!" }; return Json(data); }