Hello guys, sorry for double post, but am majorly struggling with it. I'm assuming I need to add another Control Parameter, but it says that it then doesnt exist in the SearchQuery.
Appreciate this is probably really simple, but am going insane with it!
Marc.
Do you mean that EPiServer should use the text some editor writes in the text property you have called SearchQuery and return results based on it? If so, the only thing you have to do is to set that property to be searchable, either via PageTypeBuilder or in admin-mode on the pagetype if you do not use PageTypeBuilder. You do not have to add another ControlParameter for that.
Or do you mean something else?
It really was that simple - I feel like an idiot now! Literally that search box in the admin mode needed ticking!
Thankyou Andreas, I was expecting it to be more technical than that!
Hello, I have the following code.
<spanclass="searchtitletext">Search For:<asp:TextBoxID="txtSearch"runat="server"></asp:TextBox>
<asp:ButtonID="btnSearch"runat="server"Text="Search"onclick="btnSearch_Click"/></span>
<br/>
<br/>
<hr/>
<EPiServer:SearchDataSourceID="sdsSearch"runat="server"PageLink="175">
<SelectParameters>
<asp:ControlParameterControlID="txtSearch"Name="SearchQuery"PropertyName="Text"/>
</SelectParameters>
</EPiServer:SearchDataSource>
Which bring back search results based on the page name- however how do I tell it to search an extra field, called "SearchText" which will just be a string the user manually enters.
Am under time pressure on this, so would appreciate a fast-ish repsonse!!!
Many Thanks.
Marc.