0
votes

I am looking at making a search using Examine. But I am trying to use a dropdown list instead of a search box. Is there a way to this? I am also going to have 3 dropdown lists eventually. But for now I just want to get 1 working.

I am using this example which is awesome: http://joeriks.com/2011/03/15/ajax-enabled-search-in-umbraco-using-examine-and-razor/

But I need it work with a dropdown list. I have my dropdown list generating but getting the value to search the Examine stuff is a bit tricky. I have been working on this for a couple of days and need to reach out for help.

Can anyone help?

Thanks in advance.

1

1 Answers

0
votes

When you say a dropdown list, what would that be used for? Would you effectively just have pre-determined search queries that the user could pick from, or are you trying to build some sort of filtering solution?

If it's the former option, the only difference from the example you provided is that you'd need to get the selected value from the dropdown, and pass that to the ExamineManager.Instance.SearchProviderCollection[searchProvider].Search method as the searchString parameter.

If it's the latter, however, it seems to me like you're after dynamic filtering of a node collection, in which case you don't necessarily have to use Examine - you could simply have a repeater bound to a collection, and apply the filter to the collection on the SelectedIndexChanged event of the dropdown list. (this link might help)