Reputation: 9398
@Html.ActionLink("View Details", "Index", "PatientVisitDetail", new {id=item.Id}, null)|
produces some link like, http://localhost:19456/PatientVisitDetail/Index/1
But, I want a link that says something like,
http://localhost:19456/PatientVisitDetail/Index/?id=1
Upvotes: 2
Views: 2685
Reputation: 48415
That is likely due to how your routing is setup. Not sure if there is a better way, but this should work:
<a href="@(Url.Action("Index", "PatientVisitDetail") + "?id=" + item.Id)">View Details</a>
Upvotes: 4