I'm new to MVC2 and was wondering if it was possible to pass an object into a Controller Action from a View?
e.g. I've created a ViewModel containing a list of DirectoryInfo objects and pass this to my Index view.
In the view, I loop through all of the DI objects and for each one create an ActionLink.
<%:Html.ActionLink(linkText: subfolder.Name,actionName: "Reports",
routeValues: new {folder=subfolder}, htmlAttributes:null )%>
but in my Reports action, the "folder" is always null?
public ActionResult Reports(DirectoryInfo folder)
{
//folder is always null here
Is this type of thing possible, or does the routingValue always have to be a primitive?
(ps. I have searched StackOverflow and t'internet and although I can find people asking the same question, I can't find a solution