title: Getting Checkbox Value and Text in Controller
body: <p><strong>Model</strong></p>
  
  <pre><code>public class AllControls
  {
      public List&lt;Group&gt; getChkItems { get; set; }
      public bool chk { get; set; }
  }
  
  public class Group
  {
      public int ID { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p><strong>Controller:</strong>    </p>
  
  <pre><code>[HttpGet]
  public ActionResult Index()
  {       
      List&lt;Group&gt; li = new List&lt;Group&gt;()
      {
          new Group() { ID = 1, Name = "C#" },
          new Group() { ID = 1, Name = "Asp.NET" },
          new Group() { ID = 1, Name = "SQL" }
      };
  
      AllControls model = new AllControls();
      model.getChkItems = li;
      return View(model);
  }
  
  [HttpPost]
  public ActionResult Index(AllControls e)
  {
      return View(e);
  }
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>@using (Html.BeginForm())
  {
      foreach (var x in @Model.getChkItems)
      {    
          @Html.CheckBoxFor(m =&gt; m.chk, new { value = @x.ID }) @x.Name
          &lt;br /&gt;
      }
      &lt;input type="submit" value="Submit" id="btn" /&gt;    
  }
  </code></pre>
  
  <p>How can I get the selected checkbox value and text in the controller?</p>