0

I've tried looking on the web for a reasonable way to implement a website that contains a list of items which should be filterable on all its data and return the result asynchronous. Let's say the item has 3 properties, where each property can be some value. The idea is then that I have 3 buttons, each button representing a property, with a dropdown list of the possible values as such: a row of properties witch columns of values

Lets say I come to the page with no filtering applied. And then I click on the color button and select yellow. Then I would get a result of yellow with all shapes and heights. And if I then click on shape and select circle, I would get a yellow circle with all heights, etc...

I'm currently programming in asp.net mvc5 and I can't seem to find any obvious solution to this problem.

To me it looks like the "default" solution there is to make a synchronous GET request to an Action which would set an url on all the values with any previous filter parameters. For example; let's say the action's name is ShowItems, and I enter the site. The red value would be an anchor with href="/ShowItems?color=red". I then press red and I get the result. The circle value would now have an url of "ShowItems?color=red&shape=circle, square would have "ShowItems?color=red&shape=square, 10 cm would have "ShowItems?color=red&height=10cm, etc...

Am I wrong to assume that? I don't really know where to go from here. I really don't like the idea of having to load the page for each filter click. But I'm having a hard time finding a good example for what I'm looking for.

user1784297
  • 103
  • 12
  • See [How to create facets with Lucene.Net](https://stackoverflow.com/questions/34291569/how-to-create-facets-with-lucene-net). I believe that is what you are looking for, but it is unclear why you think it needs to be asynchronous to work. You can make an AJAX request to get the values and update the UI on each click. – NightOwl888 Oct 04 '17 at 23:38
  • Oh. But that's what I meant. I mean, aren't Ajax requests asynchronous? Care to elaborate on the ajax point you made? – user1784297 Oct 05 '17 at 07:37
  • You are right. The first `A` in AJAX stands for asynchronous. – NightOwl888 Oct 05 '17 at 10:43
  • But your comment made it seem like there's e a difference between the two, because you said " You can make an AJAX request to get the values and update the UI on each click"? I'm a bit confused. – user1784297 Oct 05 '17 at 12:37
  • Sorry, my mistake. AJAX is asynchronous. Ignore my first comment (except for the link). BTW - is that link what you are trying to do? – NightOwl888 Oct 05 '17 at 12:38

0 Answers0