以下是我的 Html.Actionlink
@Html.ActionLink("Change Team", "Edit", "UserPlayers", new { MatchId = ViewBag.MatchId, UserId = ViewBag.UserId })
当我运行应用程序时我得到这个
http://localhost:50013/UserPlayers/Edit?Length=11
作为链接。
我不知道从哪里来“长度=11” coming.
您需要添加一个null
作为最后一个参数:
@Html.ActionLink("Change Team", "Edit", "UserPlayers", new { MatchId = ViewBag.MatchId, UserId = ViewBag.UserId }, null)
如果没有这个,您将使用错误的方法重载Html.ActionLink()
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)