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.
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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With