As the question says, Is it possible to use an ActionLink containing an element, and if not, what is the best way to achieve it?
For example, lets say I have a Span
element, I want the whole thing to be a hyperlink... The following works:
<a href="/Site/Page/@Model.ID?Type=test">
<span class="box5">Click anywhere in this box</span> </a>
Imagine that span/css class box5 makes this large... Was originally a DIV, but, I found that didn't follow standards and this appears to follow ok.
This renders and works fine, but, is there anyway to use an ActionLink instead? I have tried to guess the syntax such as (copying from forms):
@using (Html.Actionlink){<span class="box5">Click anywhere in this box</span>}
and many other combinations without any luck.
Now, my manual HTML workaround works fine and I am happy to leave it, but, is it possible to use a MVC ActionLink, and if it is, should I even worry/would there be any benefits?