以下にこのエラーが表示されます。
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
以下の SUBSTRING() 関数で例外がトリガーされます
<td class="hidden-desktop">@Html.DisplayFor(modelItem => item.isim.Substring(0,10).ToString());</td>
<td class="hidden-phone hidden-tablet">@Html.DisplayFor(modelItem => item.isim)</td>
画面サイズに応じて、同じテキストの短いバージョンと長いバージョンを表示しようとしています。エラーメッセージを取得するために何が間違っていますか? または、substring() を適切に使用するにはどうすればよいですか?