我在Html助手扩展程序中有这段代码
routeValues["Page"] = info.PageIndex - 1;
builder.Append("<li>")
.Append(LinkExtensions.ActionLink(html, "<<", actionName, routeValues, new { @class = "pageMore" }))
.Append("</li>");
他重载了我希望使用的ActionLink方法的版本是:
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper,
string linkText, string actionName, object routeValues, object htmlAttributes);
链接的输出是:
http://localhost/Admin/Group/Details/61?Count=2&Keys=System.Collections.Generic.Dictionary%602%2BKeyCollection[System.String%2CSystem.Object]&Values=System.Collections.Generic.Dictionary%602%2BValueCollection[System.String%2CSystem.Object]
当我指定htmlAttributes时,路由值被序列化。
我该怎么做才能获得正确的输出?