title: VB ASP.NET MVC 3 Razor CheckboxFor Error "Templates can be used only with field access"
body: <p>The following code produces the error, "Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions."</p>
  
  <pre><code>Line 66:             &lt;/div&gt;
  Line 67:             &lt;div class="editor-field"&gt;
  Line 68:                 @Html.CheckBoxFor(Function(m) m.IsCompanyOwner)
  Line 69:                 @Html.ValidationMessageFor(Function(m) m.Company)
  Line 70:             &lt;/div&gt;
  </code></pre>
  
  <p>It points the line 68.</p>
  
  <p>I have already read other posts which said to set the type, which I've done in the model:</p>
  
  <pre><code>&lt;DataType(DataType.Text)&gt; _
  Public Property IsCompanyOwner As String
  </code></pre>
  
  <p>But, it still gives me the error.  What can I do to fix?  Thanks.</p>