开发者

ActionLink behaving odd in ASP.Net MVC 2 Preview 2

开发者 https://www.devze.com 2022-12-08 05:23 出处:网络
This action link: <%=Html.ActionLink(\"About\",\"About\", \"Home\" ,new{ @class=\"menulink\" }) %>

This action link:

 <%=Html.ActionLink("About","About", "Home" ,new  { @class="menulink" }) %>

Produces the following href 'About?Length=4' so it works in the 'root' of the application, but does not once you go one leve开发者_JS百科l or more deeper. Also...why is the '?Length=4' being appended? Lol.


Go it...my parameters are out of order and missing a null RouteValueDictionary...should be:

<%=Html.ActionLink("About","About", "Home" ,null,new  { @class="menulink" }) %>
0

精彩评论

暂无评论...
验证码 换一张
取 消