I am scratching my head as to why not this isn’t working:
@if (Model.Guid != null) { Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); }
The conditional on its own is working as putting som random HTML in there instead of an actionlink works:
@if (Model.Guid != null){<span>Test</span>}
Likewise the actionlink on it’s own renders without a problem.
Could anybody clue me in to what is going on here?
You need to put an @ sign before the Html.ActionLink.
Like this:
EDIT: Forgot to add that you don’t need the semi colon, but you can leave it in if you want.