Reputation: 2630
Following is my Html.Actionlink
@Html.ActionLink("Change Team", "Edit", "UserPlayers", new { MatchId = ViewBag.MatchId, UserId = ViewBag.UserId })
When i run the application I get this
http://localhost:50013/UserPlayers/Edit?Length=11
as a link.
I dont know from where is the "Length=11" coming.
Upvotes: 5
Views: 7843
Reputation: 4320
You need to add a null
as the last parameter:
@Html.ActionLink("Change Team", "Edit", "UserPlayers", new { MatchId = ViewBag.MatchId, UserId = ViewBag.UserId }, null)
Without this, you are using the wrong method overload for Html.ActionLink()
Upvotes: 9