Home Why I get error when I try to generate ActionLink?
Reply: 0

Why I get error when I try to generate ActionLink?

user609
1#
user609 Published in June 22, 2018, 11:32 am

I have this HtmlHelper:

@foreach (var item in Model) 
{
<tr>
    <td>
        @Html.ActionLink(modelItem => item.LayoutID, "someAction");
    </td>        
</tr>
}

On this row,

@Html.ActionLink(modelItem => item.LayoutID, "someAction");

i get this error:

CS1660: Cannot convert lambda expression to type 'string' because it is not a delegate type

Why do I get the above error ? The LayoutID is of string type.

EDIT Improved Formatting

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.337936 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO