Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrapping an element with Html.ActionLink..?

I'd like to wrap a span with an action link because I'm adhering to an existing CSS theme. It doesn't look like any of Html.ActionLink's constructors allow for this. Possible solutions:

  1. A way to achieve this with existing helper?
  2. Derive & override ActionLink with new custom html helper?

If #2 is the only way I have two questions.

  1. When I right click ActionLink and hit go to definition I only see the constructor signature not that actual code body. How do I see the original function body? I don't see anything on MSDN either
  2. The above will more or less tell me, but, how to generate action url dynamically?c
like image 864
ryan Avatar asked Aug 12 '10 18:08

ryan


1 Answers

<a href="<%= Url.Action(...) %>"><span></span></a>
like image 60
Yuriy Faktorovich Avatar answered Nov 05 '22 05:11

Yuriy Faktorovich