Predictive Search on Kentico 9 (ASPX)

Karl Hudson asked on August 22, 2016 15:55

Hi,

I'm working on a Kentico 9 site and would like to set up predictive search. I'm using the ASPX model. Can someone point me in the right direction please?

Thanks

Recent Answers


Trevor Fayas answered on August 22, 2016 15:57 (last edited on August 22, 2016 15:58)

Hello!

Firstly, i would HIGHLY recommend you do not use ASPX model, there really is nothing you can do in ASPX that you can't do with Portal + an ascx control webpart, and there are MANY things you cannot do in aspx that you can do in Portal. I would switch your model now before you run into headaches down the road!

As for your question though, here is documentation on Kentico's predictive search using AJAX, should help!

https://docs.kentico.com/display/K9/Setting+up+predictive+search

0 votesVote for this answer Mark as a Correct answer

Karl Hudson answered on August 22, 2016 16:07

Thanks Trevor, I have no say in the matter (portal vs aspx), the site is already in the ASPX model.

I saw the page you referenced, however I don't have the smart search box web part. On that template, I see teh following reference:

<cms:SearchDialogWithResults ID="SearchDialogWithResults" runat="server" TransformationName="cms.root.smartsearchresults" Indexes="GeneralIndex" />

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 22, 2016 16:14

You may need to switch out the web parts then. Look at the Smart search box web part's code file, you can add that control manually in ASPX (like you can with any ascx), then set the parameters in the code behind (any that can't be defined through the control's attributes).

Make sense?

0 votesVote for this answer Mark as a Correct answer

Karl Hudson answered on August 22, 2016 16:23

Yeah, seems to make sense. I'll give it a try and follow up.

Cheers

0 votesVote for this answer Mark as a Correct answer

Karl Hudson answered on August 22, 2016 16:25 (last edited on August 23, 2016 22:22)

0 votesVote for this answer Mark as a Correct answer

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