I'm trying to build URL in razor view that will pass 2 RouteData.Values to my action. This is my code in view:
<a href="@Url.RouteUrl("CompleteFrameBrand", new { groupId = group.Id, groups = Model.Groups })"><img src="@("../../Themes/Pac/Content/images/" + group.Id + ".png")" style="vertical-align: middle; max-height: 120px; max-width: 340px;" alt="logo"/></a>
This is code in controller:
public ActionResult CompleteFrameBrand(string groupId, List<PacNopGroup> groups)
and this is my route provider:
routes.MapLocalizedRoute("CompleteFrameBrand",
"pacmodule/completeglass/{groupId}",
new { controller = "PacCompleteFrame", action = "CompleteFrameBrand" },
new[] { "Nop.Web.Controllers" });
In view I have 9 Items in Model.Groups. But when I pass it to new controller it counts 0. Even if I pass hwole model I get null in controller. Can someone explain me how should I correctly pass model object from view to controller through Url.RouteUrl. Thank you.