4
Je suis en train de faire la réponse à ceci:ASP.NET MVC Razor ternaires avec Html.ActionLink
How to use ternary operator in razor (specifically on HTML attributes)?
Avec un Html.ActionLink; quelque chose comme ceci:
@(ViewData["page"] == "Page1" ? "Page1" : Html.ActionLink("Page 1", "Page1", "Index"))
Est-ce possible?