0

这是我的操作链接:

@Html.Raw(HttpUtility.UrlDecode(Html.ActionLink("Comment", "Comment", new { id = item.NewsId, title = item.Title + "#disqus_thread"}).ToString()))

我想向它添加控制器名称,但是当我尝试之前我需要添加一个路由值..我不想这样做。

任何类型的解决方案或帮助表示赞赏

4

1 回答 1

0

这个超载怎么办?

public static MvcHtmlString ActionLink(
    this HtmlHelper htmlHelper,
    string linkText,
    string actionName,
    string controllerName,
    Object routeValues,
    Object htmlAttributes
)

动作链接代码:-

Html.ActionLink("Comment", "Comment", "MyController",new { id = item.NewsId, title = item.Title + "#disqus_thread"},null)
于 2013-05-30T16:45:27.410 回答