Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top