title: how to use multiple Checkbox in ASP.Net mvc3 Razor
body: <p>In my <strong>ASP.Net MVC3 Razor</strong> project i have to implement a customer registration form(Screen Shot Attached).In that form , a single entity (say :purpose of doing DMIt) contains more than one answer.So i use checkbox to select the multiple or single answer.I have the view page and also a Model.How to code the View  page to select multiple checkbox and also in Controller.</p>
  
  <p><img src="https://i.stack.imgur.com/A23rt.jpg" alt="Page Screenshot"></p>
  
  <p><strong>Controller Code</strong></p>
  
  <pre><code> public ActionResult CustomerRegistration()
          {
              return View();
          }
  </code></pre>
  
  <p><strong>Model Code</strong></p>
  
  <pre><code>namespace Elixir.Models
  {
      [Table("tbl_ElixirCustomer")]
      public class Customer
      {
          [Key]
          public int CusId { get; set; }
          public string Name { get; set; }
          public int age { get; set; }
          public int Gender { get; set; }
          public string FathName { get; set; }
          public string MothName { get; set; }
          public string OrgSchooName { get; set; }
          public string Address { get; set; }
          public string city { get; set; }
          public string State { get; set; }
          public string PIN { get; set; }
          public string tele { get; set; }
          public string Mob { get; set; }
          public string Email { get; set; }
          public string Web { get; set; }
          public string Purpose { get; set; }
          public string brief { get; set; }
  
      }
  
      public class CustomerViewModel
      {
          public string Purpose { get; set; }
          public int Id { get; set; }
          public bool IsChecked { get; set; }
  
      }
  }
  </code></pre>
  
  <p><strong>View Code</strong></p>
  
  <pre><code> &lt;div class="col-lg-10"&gt;@Html.TextBoxFor(Model =&gt; Model.Mob, new { @class = "form-control" })&lt;/div&gt;
                          &lt;label class="col-lg-2 control-label"&gt;
                              Email&lt;/label&gt;
                          &lt;div class="col-lg-10"&gt;@Html.TextBoxFor(Model =&gt; Model.Email, new { @class = "form-control" })&lt;/div&gt;
                          &lt;label class="col-lg-2 control-label"&gt;
                              Web Site&lt;/label&gt;
                          &lt;div class="col-lg-10"&gt;@Html.TextBoxFor(Model =&gt; Model.Web, new { @class = "form-control" })&lt;/div&gt;
  
                          &lt;label class="col-lg-2 control-label"&gt;
                              Purpose of doing DMIT&lt;/label&gt;
                          &lt;div class="col-lg-10"&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Career Planning&lt;/span&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Personel&lt;/span&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Relationship&lt;/span&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Parenting&lt;/span&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Activity Plan for children&lt;/span&gt;
                              &lt;div class="styled-chekbox"&gt;
                                  &lt;input type="checkbox" checked class="icheck-box-flat"&gt;
                              &lt;/div&gt;
                              &lt;span class="checkbox-label"&gt;Stress Management&lt;/span&gt;
                          &lt;/div&gt;
                          &lt;label class="col-lg-2 control-label"&gt;
                              Any Challenges&lt;/label&gt;
                          &lt;div class="col-lg-10"&gt;@Html.TextAreaFor(model =&gt; model.brief, new { @class = "tinymce-simple span12", @row = "170", @cols = "45", @width = "40%" })&lt;/div&gt;
  
                           &lt;div class="col-lg-2 control-label"&gt;&lt;/div&gt;
   &lt;div class="col-lg-10"&gt;
  
                              @*&lt;input type="button" class="" /&gt;*@ @* &lt;button type="submit" class = "btn btn-success"&gt;@Html.ActionLink("Save", "EmployeeRegistration", "Home")&lt;/button&gt;*@
                              @* &lt;button type="submit" &gt;@Html.ActionLink("Save", "EmployeeRegistration", "Home",  new { @class = "btn btn-success" })&lt;/button&gt;*@
                              &lt;input type="submit" class="btn btn-success" value="Save" /&gt;
                              &lt;button class="btn btn-success"&gt;
                                  Clear&lt;/button&gt;
                              &lt;button class="btn btn-success"&gt;
                                  Cancel&lt;/button&gt;
                                  &lt;/div&gt;
  </code></pre>