For the most part, my links (see an example below) work fine, but occasionally something odd will happen in that the actual URL that the link goes to makes no sense at all.
Working link example
This link works perfectly fine. The class contains a background image so that the link can be seen on the page.
@Html.ActionLink(" ", "Edit", new { id = user.PKey }, new { @class = "edit-button" })
This link navigates to ~/Users/1
assuming an id value of 1 is passed to it.
Broken link
This link doesn't work at all:
@Html.ActionLink(User.Identity.Name, "Manage", "Account", new { name = User.Identity.Name })
This link appears as part of a welcome message. The link text is my username, so I figured it would navigate to ~/Account/Manage/ortund
but instead it navigates to ~/Home/Manage?Length=7
As yet the Manage ActionResult in the Account Controller does nothing, but when I get to coding it in, it will just return a view that allows the logged-in user to update their profile and see their activity.
As far as I can see there's no difference in these 2 links aside from the class that's being set on one of them. Can someone help me to understand why the 2nd link doesn't work?
Thanks in advance!