Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainViewModel
- {
- public string PropertyA {get;set;}
- public PartialViewModel PropertyB {get;set;}
- }
- public class PartialViewModel
- {
- public string PropertyViewModel {get;set;}
- }
- @model Namespace.Models.MainViewModel
- @using (Html.BeginForm("CreateMethod", "ViewController", FormMethod.Post, new { role = "form" }))
- {
- <div>
- @Html.TextBoxFor(m => m.PropertyA)
- </div>
- <div>
- @{Html.RenderPartial("_PartialView", Model.PropertyB);
- </div>
- <div>
- <input type="submit">
- </div>
- }
- @model PartialViewModel
- <div>
- @Html.TextBoxFor(m => m.PropertyViewModel)
- </div>
Add Comment
Please, Sign In to add comment