I have two questions:
- I'm wondering how I can display no link text when using
Html.ActionLink()
in an MVC view (actually, this isSite.Master
).
There is not an overloaded version that does not allow link text, and when I try passing in just a blank string
, the compiler tells me it needs a non-empty string.
How can I fix this?
-
I need to put
<span>
tags within the anchor tag, but it's not working withHtml.ActionLink();
. I'd like to see the following output:Span text
How can I put tags inside of the anchor tag in ASP.NET MVC?
Best Answer
Instead of using Html.ActionLink you can render a url via Url.Action
And to do a blank url you could have