I have this snippet of code in a Html helper extension
routeValues["Page"] = info.PageIndex - 1;
builder.Append("<li>")
.Append(LinkExtensions.ActionLink(html, "<<", actionName, routeValues, new { @class = "pageMore" }))
开发者_Go百科 .Append("</li>");
he overloaded version of the ActionLink method I wish to use is this:
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper,
string linkText, string actionName, object routeValues, object htmlAttributes);
The output of the link, however is:
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]
Somehow when I specify the htmlAttributes, the routevalues are serialized.
What should I do to get the right output?
精彩评论