【发布时间】:2011-01-16 15:35:11
【问题描述】:
我正在尝试将路由值发送到一个方法,但我似乎无法弄清楚这一点。这是我的代码
<% string s = "cool";
object d = new { s = "1" };
%>
<%= Html.ActionLink("Home", "Index", d, "ql")%>
下面的代码会生成一个这样的 url
http://localhost:49450/?s=1
网址应该是这样的
http://localhost:49450/?cool=1
我错过了什么
【问题讨论】:
标签: c# asp.net-mvc url url-routing