I have a view I want to display an Html.ActionLink if a ViewBag dynamic variable is true and show a Html.Label if that same variable is false.
I also want the ActionLink LinkText to be based on the value of a property in my Model.
i.e. item.Description
so it should be
@Html.ActionLink(item.Description, "MyAction")
or
@Html.LabelFor(item.Description)
How do I get this to work?
Thanks,
David
1 Answer