Reputation: 21440
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."
Line 66: </div>
Line 67: <div class="editor-field">
Line 68: @Html.CheckBoxFor(Function(m) m.IsCompanyOwner)
Line 69: @Html.ValidationMessageFor(Function(m) m.Company)
Line 70: </div>
It points the line 68.
I have already read other posts which said to set the type, which I've done in the model:
<DataType(DataType.Text)> _
Public Property IsCompanyOwner As String
But, it still gives me the error. What can I do to fix? Thanks.
Upvotes: 0
Views: 1217