title: In MVC, how can I make this example of a checkbox checked by default?
body: <p>I am trying to make a checkbox in MVC be checked by default.</p>
  
  <p>Below is my code.  For all examples I have seen of this, the person uses something different than what I am trying so I have not been able to find help on this yet.</p>
  
  <pre><code>&lt;%=Html.CheckBoxFor(Function(model) model.Delete)%&gt;
  </code></pre>
  
  <p>I have tried adding the <code>, new { @checked = "checked" }</code> approach and that didnt work. I got a squiggly line under the first "{".... the entire line looked like this...</p>
  
  <pre><code>&lt;%=Html.CheckBoxFor(Function(model) model.Delete, new { @checked = "checked" }))%&gt;
  </code></pre>
  
  <p>Any advice on how I can get this checkbox to be auto checked?</p>
  
  <p>thanks for any help group.</p>
  
  <p>Will</p>
  
  <p>This is what I am using in my controller. This is the start of the COntroler... this is not work. FirstNameAsBusiness is the name of the checkbox</p>
  
  <p>In the view... </p>
  
  <p>&lt;%=Html.CheckBoxFor(Function(model) model.FirstNameAsBusiness)%> 
  &lt;%=Html.LabelFor(Function(model) model.FirstNameAsBusiness)%></p>
  
  <p>In the controller.... </p>
  
  <pre><code>Function Edit(ByVal a As AuditModel) As ActionResult
      a.FirstNameAsBusiness = True 
      Return View(a)
  End Function
  </code></pre>