Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. Email<input type="text" id="email" /><br />
  2. Re-enter Email<input type="text" id="confirm-email" />
  3.  
  4. public class ConfirmEmailModel?????
  5. {
  6. [Required]
  7. [Display(Name = "Email",ResourceType=typeof(mvc3test.Resources.Common))]
  8. public string Email{ get; set; }
  9.  
  10. [Display(Name = "Confirm Email")]
  11. [Compare("Email", ErrorMessage = "no match.")]
  12. public string ConfirmEmail{ get; set; }
  13. }
  14.  
  15. public class Person { }
  16.  
  17. public class PersonViewModel { }
  18.  
  19. public PersonController(IViewModelService<PersonViewModel> viewModelService)
  20. {
  21. _viewModelService = viewModelService;
  22. }
  23.  
  24. public ViewResult Edit(int id)
  25. {
  26. PersonViewModel model = _viewModelService.Get(id);
  27. return View(model);
  28. }
  29.  
  30. [HttpPost]
  31. public ViewResult Edit(PersonViewModel model)
  32. {
  33. if (ModelState.Valid)
  34. {
  35. _viewModelService.Update(model);
  36. }
  37.  
  38. return View(model);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement