Mohamed Sherif

Mohamed Sherif

  • NA
  • 28
  • 31.8k

MVC error

Aug 21 2013 5:28 AM

Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.

 

 </td>
Line 44:                         <td class="editor-field ">
Line 45:                             <%: Html.CheckBoxFor(m=>Convert.ToBoolean(m.Profile.IsActive))%>
Line 46:                             <%: Html.ValidationMessageFor(m => m.Profile.IsActive)%>
Line 47:                         </td>



Get this error.when i run my application..Isactive is byte field,how to type cast in aspx page.

Answers (14)