I’m having a problem generating dynamic links to items from my code.
Code that I’m using:
Html.ActionLink("View Checklist Summary", "Details", "Product",
new { Area = "Reporting" }, new { Item = 478})
What I need:
URL — localhost:58412/Reporting/Product/Details?Item=478
What I’m getting:
URL — localhost:58412/Reporting/Product/Details
I’ve been working on this for way too long, and I can’t seem to find any reason why the “Item=478” is not being added to the URL created by the ActionLink.
Any help would be much appreciated.
Try this:
The Area and the Item must be specified in the routevalues object. The last empty object, if I recall, is the HtmlAttributes object.