我使用的是RouteValueDictionary到RouteValues傳遞給ActionLink的:RouteValueDictionary和htmlAttributes之間是否存在衝突?
如果我的代碼:
<%:Html.ActionLink(SharedResources.Shared_Pagination_First, Model.ActionToExecute, Model.ControllerToExecute, Model.FirstRouteValues, null)%>
鏈接結果是正常:
SearchArticles?refSearch=2&exact=False&manufacturerId=5&modelId=3485&engineId=-1&vehicleTypeId=5313&familyId=100032&page=0
但是,如果我的代碼:
<%: Html.ActionLink(SharedResources.Shared_Pagination_First, Model.ActionToExecute, Model.ControllerToExecute, Model.FirstRouteValues, new { @title = string.Format(SharedResources.Shared_Pagination_LinkTitle, 0) })%>
鏈接結果爲:
SearchArticles?Count=10&Keys=System.Collections.Generic.Dictionary%602%2BKeyCollection%5BSystem.String%2CSystem.Object%5D&Values=System.Collections.Generic.Dictionary%602%2BValueCollection%5BSystem.String%2CSystem.Object%5D
什麼問題?唯一的區別是在最後我使用htmlAttributes
非常感謝你 – Pedre 2012-07-27 10:13:16
歡迎您。很高興我能幫上忙。 – 2012-07-27 10:13:32