title: HTML.Checkboxfor to Toggle button HTML?
body: <p>Is there anyway to convert the @HTML.Checkboxfor into toggle html button?
  I have refer the toggle button style from <a href="https://www.w3schools.com/howto/howto_css_switch.asp" rel="noreferrer">https://www.w3schools.com/howto/howto_css_switch.asp</a></p>
  
  <p>Currently its working by using :</p>
  
  <pre><code>@Html.CheckBoxFor(model =&gt; model.IsEnabled, new { @checked = "checked", @Name = "DelegateChkBox" })
  </code></pre>
  
  <p>Changed to:</p>
  
  <pre><code>    &lt;td class="slider-td"&gt;
           &lt;label class="switch"&gt;
              &lt;input name="DelegateChkBox" id="IsEnabled" type="checkbox" value="true" data-val-required="The IsEnabled field is required." data-val="true" data-bind="checked: IsEnabled"&gt;
            &lt;div class="slider round"&gt;&lt;/div&gt;
            &lt;/label&gt;
     &lt;/td&gt;
  </code></pre>
  
  <p>The toggle button only works and postback to controller if it's CHECKED:
  <a href="https://i.stack.imgur.com/5cyu9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5cyu9.png" alt="enter image description here"></a></p>
  
  <p>else it won't postback to controller by default UNCHECKED :</p>
  
  <p><a href="https://i.stack.imgur.com/Bqvak.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bqvak.png" alt="enter image description here"></a></p>
  
  <p>Any help will be appreciated!
  Thanks!</p>