public ActionResult CreateNewContact() { ContactViewModel newContact = new ContactViewModel() { Email = Request.Params["Email"], Message = Request.Params["Message"], Name = Request.Params["Name"], Website = Request.Params["Website"] }; ContactDAORequest request = new ContactDAORequest(); request.Add(newContact); return(RedirectToAction("Contact")); }
public ActionResult AddContact() { string name = Request.Params["Name"]; string email = Request.Params["Email"]; string website = Request.Params["Website"]; string message = Request.Params["Message"]; if (name != null && email != null && message != null) { ContactViewModel newContact = new ContactViewModel() { Email = email, Message = message, Name = name, Website = website }; ContactDAORequest dao = new ContactDAORequest(); dao.Add(newContact); } return(RedirectToAction("Contact")); }