Ok, I am having some problems with the htmlhelper actionlink.
I have complicated routing:
routes.MapRoute("Groep_Dashboard_Route", // Route name "{EventName}/{GroupID}/Dashboard", // url with Paramters new {controller = "Group", action="Dashboard"}); routes.MapRoute("Event_Groep_Route", // Route name "{EventName}/{GroupID}/{controller}/{action}/{id}", new {controller = "Home", action = "Index"});
My problem is to create action links matching these patterns. The eventname parameter is actually just for a convenient reference. he does not do anything.
Now when I try, for example, to create a link. which shows a dashboard of a certain level. How:
mysite.com/testevent/20/Dashboard
I will use the following actionlink:
<%: Html.ActionLink("Show dashboard", "Group", "Dashboard", new { EventName_Url = "test", GroepID = item.groepID}, null)%>
What my actual result in html gives:
<a href="">Show Dashboard</a>
What I should have is something like:
<a href="test/20/Dashboard">Show Dashboard</a>
Please carry me, I'm still new to ASP MVC. Can someone tell me what I am doing wrong?
Help will be appreciated!