daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Aug 11th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @model IEnumerable<WFAccess.Models.ViewModels.SiteViewModel>
  2.  
  3. <div class="row">
  4.     <table class="table table-striped table-hover table-width-custom">
  5.         <thead>
  6.             <tr>
  7. ....
  8.    
  9. [HttpGet]
  10.     public ActionResult ListItems()
  11.     {
  12.         SiteStore site = new SiteStore();
  13.         site.GetSites();
  14.  
  15.         IEnumerable<SiteViewModel> sites =
  16.             site.SitesList.Select(s => new SiteViewModel
  17.             {
  18.                 Id = s.Id,
  19.                 Type = s.Type
  20.             });
  21.  
  22.         return PartialView("_ListItems", sites);
  23.     }
  24.    
  25. public class Foo
  26. {
  27.     public string FooName { get; set; }
  28.     public List<Bar> Bars { get; set; }
  29. }
  30.  
  31. public class Bar
  32. {
  33.     public string BarName { get; set; }
  34. }
  35.    
  36. @model Foo
  37.  
  38. @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })  
  39. @Html.EditorFor(m => m.Bars)
  40.    
  41. @model List<Bar>
  42.  
  43. <div class="some-style">
  44.     @foreach (var item in Model)
  45.     {
  46.         <label>@item.BarName</label>
  47.     }
  48. </div>
  49.    
  50. @model Foo
  51.  
  52. @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })  
  53. <div class="some-style">
  54.     @Html.EditorFor(m => m.Bars)
  55. </div>
  56.    
  57. @model Bar
  58.  
  59. <label>@Model.BarName</label>
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