包装与Html.ActionLink一个元素..? [英] Wrapping an element with Html.ActionLink..?
本文介绍了包装与Html.ActionLink一个元素..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想换一个跨度操作链接,因为我坚持现有的CSS的主题。它看起来并不像任何 Html.ActionLink
的构造函数允许这一点。可能的解决方案:
- 系统的方式与现有的帮助实现这一目标?
- 导出和放大器;新的自定义HTML帮手覆盖ActionLink的?
如果#2是我有两个问题的唯一途径。
- 当我右键点击ActionLink的,打去定义,我只看到了构造函数的签名不实际的code身上。我怎么看到原来的函数体?我没有看到任何东西MSDN或者
- 上面或多或少告诉我,但是,如何动态地生成操作URL?ç
解决方案
< A HREF =<%= Url.Action(...)%>> &所述;跨度>&下; /跨度>&下; / A>
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:
- A way to achieve this with existing helper?
- Derive & override ActionLink with new custom html helper?
If #2 is the only way I have two questions.
- 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
- The above will more or less tell me, but, how to generate action url dynamically?c
解决方案
<a href="<%= Url.Action(...) %>"><span></span></a>
这篇关于包装与Html.ActionLink一个元素..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文