I'm currently trying to user actionlink helpers in a way that I don't think was described in NerdDinner.
Lets say I am on this page
/Dinners/
and on that page there is a list of dinners, ok fine and working
now lets say I want to goto a new section of the site, which I have created a new controller MenuItemsController
so lets say I want to goto a new part of the website that manages menu items.
So going to
/menuitems/3
would bring up all the menu items assoicated with dinner id 3.
This is also working.
I am having trouble, linking to each of the menu item pages, because when I use the actionlink code, without much modification i get this
dinner1 = link /dinners/menuitems/3
rather than
dinner = link /menuitems/3
The actionlink code i am trying is
<%= Html.ActionLink("Menu Items", "/menuitems", new { id=item.id })%>
you can see the / there. This feels wrong.
I wasn't sure if this post was talking about the same problem or not.
Are action links the completely wrong thing for me to be using here, becuase they are binded directly to the controller I am currently inside of?
If so, what would be the best method for me to achieve what I am trying to do, and also add further complexity like linking to create/edit/delete methods?