title: multiple models with foreach loop asp.net mvc
body: <p>Thanks to stackoverflow I found a method to get multiple models in 1 view, but now I don't seem to be able to access it or something since my foreach loop gives an error. </p>
  
  <p>My view:</p>
  
  <pre><code>@model IVH7B2.Models.adminPanelModel
  
   @foreach (IVH7B2.Models.adminPanelModel us in Model) {
      &lt;tr&gt;
          &lt;td&gt;@us.userl.userID&lt;/td&gt;
          &lt;td&gt;@us.userl.UserName&lt;/td&gt;
          &lt;td&gt;@us.userl.UserPassword&lt;/td&gt;
  </code></pre>
  
  <p>in adminPanelModel is a user class that i need to acces so i can show all users on screen.</p>
  
  <p>My model:</p>
  
  <pre><code>namespace IVH7B2.Models {
      public class adminPanelModel {
          public Users userl { get; set; }
          public NewsLetter newsl { get; set; }
      }
  }
  </code></pre>
  
  <p>I found out the answer, below was my fix:</p>
  
  <pre><code>@foreach (IVH7B2.Domain.Models.Users us in Model.userl ) {
  </code></pre>