Sunday, 2 July 2017

If statement and Html.ActionLink in Razor MVC 3

I think you forgot an @ which is used to output:
@if (item.hasTypes.Value) { 
    @Html.ActionLink(item.marketGroupName, "Index", new { id = item.marketGroupID });
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.