I have several tabs, and I want to say: "If they are currently on the page that this tab links to, make it span. Otherwise, make it a link." In a pseudo razor, it will look like this:
@if(CurrentlyOnThisPage) { <span> } else { <a> } Tab Content @if(CurrentlyOnThisPage){ </span> } else { </a> }
Razor (correctly) notes that I am not closing my start tags, and therefore cannot parse this syntax. If the contents of the tab were small, I could use Html.ActionLink , but I have a few lines, and I would like to keep the benefits of the HTML editor, rather than putting it in a line. Is there any way to do this?
source share