title: How to add styles in Html.CheckBox control in razor view?
body: <p>I have created the below checkbox list in cshtml:</p>
  
  <pre><code>if (control.ControlData == "1") {
                  @Html.CheckBox(@control.ControlId, true, new { @id = @control.ControlId ,style="position:absolute;left: @string.Concat(@control.LeftLocation,"px"); top:@string.Concat(@control.TopLocation,"px");height:@string.Concat(@control.Height,"px")",@class="checkboxpair" });
          @*Basically want to replace the below by the above*@
                  @*&lt;input type="checkbox" style="position:absolute;left: @string.Concat(@control.LeftLocation+@control.Width/2,"px");top:@string.Concat(@control.TopLocation,"px");height:@string.Concat(@control.Height,"px")" class="checkboxpair" id="@control.ControlId" name="@control.ControlId" value="2" /&gt;*@
                } 
  </code></pre>
  
  <p>I am getting some error related to :</p>
  
  <blockquote>
    <p>, expected</p>
  </blockquote>
  
  <p>I think I am making a mistake while creating the html object inside <code>Html.Checkbox;</code> any idea on this?</p>
  
  <p>Basically, how do I set styles for <code>Html.CheckBox</code> controls?</p>
  
  <p>Thanks in advance.</p>