Guest User

Untitled

a guest
Aug 10th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public class MainViewModel
  2. {
  3. public string PropertyA {get;set;}
  4. public PartialViewModel PropertyB {get;set;}
  5. }
  6.  
  7. public class PartialViewModel
  8. {
  9. public string PropertyViewModel {get;set;}
  10. }
  11.  
  12. @model Namespace.Models.MainViewModel
  13. @using (Html.BeginForm("CreateMethod", "ViewController", FormMethod.Post, new { role = "form" }))
  14. {
  15. <div>
  16. @Html.TextBoxFor(m => m.PropertyA)
  17. </div>
  18. <div>
  19. @{Html.RenderPartial("_PartialView", Model.PropertyB);
  20. </div>
  21. <div>
  22. <input type="submit">
  23. </div>
  24. }
  25.  
  26. @model PartialViewModel
  27. <div>
  28. @Html.TextBoxFor(m => m.PropertyViewModel)
  29. </div>
Add Comment
Please, Sign In to add comment