I have the following route:
routes.MapRoute(
"edit_product", // Route name
"Product/Edit/{productId}", // URL with parameters
new { controller = "Product", action = "Edit",
productId = UrlParameter.Optional } // Parameter defaults
);
Why does this code works:
<%: Html.ActionLink("Edit", "Edit",
new { controller = "Product", productId = product.ProductId }) %>
And this doesn't:
<%: Html.ActionLink("Edit", "Edit", "Product",
new { productId = product.ProductId }) %>