Reputation: 21188
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:
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.
Upvotes: 3
Views: 646
Reputation: 1566
I built a URL expression parser a few weeks ago that will filter an IQueriable based on expressions from a URL. Here's a blog post for the explanation. Basically you can build your own expressions and plug them into the parser... or you could do it the standard IQueriable way with something like /price-greaterthan-3/price-lessthan-4000/acres-lessthan-10/
Upvotes: 1