请教@Html.ActionLink的使用问题
请教在Index.cshtml中有代码
<p>@Html.ActionLink("测试", "Test", "Index", new { id = 1 }) </p>
怎么运行时输出的HTML代码是:
<p><a href="/Test?Length=5" id="1">测试</a> </p>
按理应该是
<p><a href="/Test?id=1">测试</a> </p>
[解决办法]
<p>@Html.ActionLink("测试", "Home", "Index", new { id = 1 },null) </p>
@Html.ActionLink("测试", "Test", new { myID = 1 })