Search code examples
model-view-controlleractionlink

ActionLink behaving odd in ASP.Net MVC 2 Preview 2


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 level or more deeper. Also...why is the '?Length=4' being appended? Lol.


Solution

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

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