title: ASP.NET RAZOR - How to Bind razor checkBox on custom Boostrap 4 Checkbox Switch
body: <p>How would I put the codes generated by the razor on this switch?</p>
  
  <p>It would work like the ckeckbox</p>
  
  <p><a href="https://i.stack.imgur.com/7mmm2.png" rel="nofollow noreferrer">Image Discription</a></p>
  
  <p>An here is the link how its work:
  <a href="https://bootsnipp.com/snippets/GaxR2" rel="nofollow noreferrer">https://bootsnipp.com/snippets/GaxR2</a></p>
  
  <pre><code> &lt;div class="card" style="margin:50px 0"&gt;
      &lt;div class="card-header"&gt;Checkbox to Switch&lt;/div&gt;
  
      &lt;ul class="list-group list-group-flush"&gt;
          &lt;li class="list-group-item"&gt;
              Bootstrap Switch Success
              &lt;label class="switch "&gt;
                  &lt;input type="checkbox" class="success"&gt;
                  &lt;span class="slider"&gt;&lt;/span&gt;
              &lt;/label&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Razor Code</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      @Html.LabelFor(model =&gt; model.ExibirInfoPosicionamento, htmlAttributes: new { @class = "control-label " })
      &lt;div class="col-md-10"&gt;
          @Html.CheckBoxFor(model =&gt; model.ExibirInfoPosicionamento, new { })
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>