In my view I have the following actionlink:
Html.ActionLink(item.users.nickname, "Details", new { controller = "Account" }, new { id = item.users.id })
This should link to Acount/Details/2 but for some reason it only links to Account/Details I've even tried changing
new { id = item.users.id }
into
new { id =开发者_高级运维 2 }
But that gives me the same outcome. I have the default MVC route in place but that shouldn't give any problem?
Try this
Html.ActionLink(item.users.nickname, "Details", new { controller = "Account" , id = item.users.id })
@Html.ActionLink("Details", "Details", new { id = item.users.id })
should do it. Where do you determine the text of your link here?
精彩评论