title: How to have ASP.Net MVC 3.0 Checkboxfor as checked by default?
body: <p>I want mt view to have the check box checked by default,
  I tried something like this.</p>
  
  <pre><code>@Html.CheckBoxFor(model=&gt;model.GenericsOK, new { id = ViewBag.GenericsOK, @checked = true })
  </code></pre>
  
  <p>and also</p>
  
  <pre><code>@Html.CheckBoxFor(model=&gt;model.GenericsOK, new { id = ViewBag.GenericsOK, @checked = "checked"})
  </code></pre>
  
  <p>in both cased it give the below error.
  <strong>String was not recognized as a valid Boolean.</strong></p>
  
  <p>My property is defined as this.</p>
  
  <pre><code>private bool _deafaultchecked = true;
  
      [Display(Name = "Generics Ok")]
      public bool GenericsOK
      {
          get { return _deafaultchecked; }
          set { _deafaultchecked = value; }
      }
  </code></pre>
  
  <p>any suggestions please?</p>
  
  <p><hr />
  <hr /> Since i could not find a solution or this.
  i got this done like this.</p>
  
  <pre><code> @Html.CheckBox("GenericsOK", true, new {id=ViewBag.GenericsOK, name="GenericsOK" })
  </code></pre>
  
  <p>this works for my requirement.
  thanks for all who helped me.</p>