smart search Dropdownlist loses the selected value on postBack

Farah El Agha asked on November 9, 2017 09:27

hello, I want to ask how to keep the value selected in the dropdown list (within a search filter) when I navigate in the pages of the search results (using the pager), because I am losing the filter values on navigation, for example: after filtering products to choose only Laptops, and navigating to the second page of the search results, the products refresh and remove the condition (productType: Laptopp) and dropdown selected index returns to 0 which in my case is AllProducts.

Recent Answers


Brenden Kehren answered on November 9, 2017 14:52

The selected index is not kept, you'd have to create a custom filter control to handle this.

0 votesVote for this answer Mark as a Correct answer

Manohar reddy vangala answered on November 9, 2017 16:38

For paging set the property as post back instead of query string.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 9, 2017 17:11

Unfortunately Manohar, postback will not keep the value if the user navigates away from the page and tries to go back.

0 votesVote for this answer Mark as a Correct answer

Farah El Agha answered on November 10, 2017 07:23 (last edited on November 10, 2017 07:49)

well thank you brenden, but please can you provide me with some details about the custom filter? how should I build it and how to customize it to preserve the index?

0 votesVote for this answer Mark as a Correct answer

Farah El Agha answered on November 13, 2017 07:57 (last edited on November 13, 2017 08:12)

hi Brenden, I am still stuck with the same problem, Isnt there another way to do this without changing the filter? and if not and I have to build a search filter, for which data source I would have to pass it (please note that I am using smart search results as ASPX)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.