【发布时间】:2013-05-10 09:22:32
【问题描述】:
SO 社区
我有以下问题:
如果我像这样渲染 ActionLink:
@Html.ActionLink(titleText,
Title.Href.TargetAction,
Title.Href.TargetController,
Title.Href.TargetRouteValues,
null)
渲染的元素是:
<a href="/eagle/Intervention/Edit_Inv?ID_INV=53165"> 19/ 2013</a>
但是如果我像这样添加一个对象作为 HTMLAttributes:
@Html.ActionLink(titleText,
Title.Href.TargetAction,
Title.Href.TargetController,
Title.Href.TargetRouteValues,
new {target="_blank"})
我得到以下标记:
<a href="/eagle/Intervention/Edit_Inv?Count=1&Keys=System.Collections.Generic.Dictionary%602%2BKeyCollection%5BSystem.String%2CSystem.Object%5D&Values=System.Collections.Generic.Dictionary%602%2BValueCollection%5BSystem.String%2CSystem.Object%5D" target="_blank"> 19/ 2013</a>
我有什么选择?
提前致谢, 西尔维乌。
【问题讨论】:
-
你能给出 TargetRouteValues 的类型吗?
标签: asp.net-mvc-3 html-helper html.actionlink