ActionLink sending a model of a complex type
- by Xenph Yan
I'm trying to paginate the results of a "advanced search", I have a complex model that represents the search options;
int ZipCode
int MinAge
int MaxAge
Availability
bool Monday
bool Tuesday
...
bool Friday
Requirements
bool FirstAid
bool DriversLicense
I'm using;
<%: Html.ActionLink("Next »", "Save", "Notification", Model.options)%>
Which correctly sends all the data at the first level, but anything that is a sub-object (Availability or requirements) isn't expanded in the URL, all I get is the class name and so I lose most of the search options when I click the link to change to a different page.
Any thoughts?