I am trying to pass an id to the URL, However I cant hard code the ID but I need to pass the id from the model.
It is basically a collection of a particular type of model displayed as a table. When the user clicks on the id value of the table i need to be able to pass the id to the URL so that it can open a corresponding detailed page of the same.
<a href="~/Instance/Details/[email protected](modelitem => item.Id)"> @Html.DisplayFor(modelitem => item.Id)</a>
This is what I am trying, need help:).
modelitem => item.Idthis looks wrong. Shouldn't it bemodelitem => modelitem.Id?