Think about New Egg's e-commerce drill down model to start, where keyword links on the nav bar further limit the currently displayed product list with each selection.
I setup a house finder with Routes like this:
http://{website.com}/{Housetype}/{PriceLow}-{PriceHigh}
http://mysite.com/Residential/180000-230000
http://mysite.com/Commercial/300000-500000
But now I want to add links on the side navigation that further limit content:
1 Bedroom
2 Bedroom
4 Bedroom
1-4 Acres
4-10 Acres
10+ Acres
How would I pass and maintain selections between clicks using MVC? I think my options are:
- Keep adding named parameters in the query string like /{acres}:{low}-{high}, but this will require that all parameters exist, I wouldn't be able to pick more than one criteria, or I hit the max querystring length.
- Once I know the {housetype} and {price range} then flip to a totally different strategy, maybe passing an object (like a DTO) that will .AddCriteria( "Acres", ".gt.", "1"); .AddCriteria("Acres", ".lt.", "4"), etc.... This sounds very complicated
- Something else?
Again, looking for starter answers, the most common way (almost design pattern way) to send filter and sort criteria from a client to ASP.NET MVC. Links are helpful too.