title: Binding check box values to list in the model mvc
body: <p>My problem is I have to create a layout like the following Using MVC to assign rights to the user.<img src="https://i.stack.imgur.com/TzlEv.jpg" alt="Sample of the lay out needed"></p>
  
  <p>Now there is no problem in creating the check boxes I'll create it using the list of users.
  but while submitting the form i should submit it to the list like below.</p>
  
  <pre><code>public class UserRightsViewModel
      {
         public UserRightsViewModel()
          {
              _screenrights = new List&lt;ScreenRight&gt;();
  
          }
          public String Id { get; set; }// Role Name 
          List&lt;ScreenRight&gt; _screenrights;
          public List&lt;ScreenRight&gt; ScreenRights { get { return _screenrights; } set { _screenrights = value; } }
  
      }
  </code></pre>
  
  <p>definition for screenRight is below</p>
  
  <pre><code>public class ScreenRight
  {
         public String UserName { get; set; }
          public Boolean Select{ get; set; }
          public Boolean Add{ get; set; }
          public Boolean Edit{ get; set; }
         ,,,
  }
  </code></pre>
  
  <p>Now while submitting the form how can i post it to the controller in the right format.</p>