コード例 #1
0
        public ActionResult HandleFromPost(ContactDataModel model)
        {
            var newEmail = Services.ContentService.CreateContent(model.ID + model.firstname, CurrentPage.Id, "ContactPage");
            newEmail.SetValue("emailfrom", model.emailfrom);
            newEmail.SetValue("firstname", model.firstname);
            newEmail.SetValue("lastname", model.lastname);
            Services.ContentService.SaveAndPublishWithStatus(newEmail);

            return RedirectToCurrentUmbracoPage();
        }
コード例 #2
0
 public ActionResult ShowForm()
 {
     ContactDataModel mmodel =  new ContactDataModel();
     return PartialView("ContactForm", mmodel);
 }