prabhu p

prabhu p

  • NA
  • 181
  • 114.5k

Need a solution for Error in viewpage MVC

Jan 22 2018 6:40 AM
I am getting error
 
"cannot convert lambda expression to type bool because it is not a delegate type"
 
In mvc view
 
Line
 
@for (int i = 0; i < Model.Count(); i++)
{
<tr>
@if(m => m[i].Selected=="1") //errorline
{
}
<td>
@Html.CheckBoxFor(m => m[i].Selected, new { @checked = "checked" })
</td>
<td>
@Html.DisplayFor(m => m[i].Text)
@Html.HiddenFor(m => m[i].Value)
@Html.HiddenFor(m => m[i].Text)
</td>
</tr>
}

Answers (2)