Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
After solving the original issues I had with XSLT Search - discovered it was a different version of Umbraco than I first thought - I still have some issues getting it up and running.
I'm using a user control for the search box as it is to appear on every page.
If I place the macro in the user control, and use the textbox and button contained within that I DO get results shown on the same page, so I know that the actual xslt file is working correctly.
However, when using my own textbox and button, and setting the target page to "/search.aspx" I am not being directed to the target page.
When I navigate to the search.aspx and enter a search term and click the button, nothing happens.
The server form tag is on the master page but in my user control I have the following:
<form method="post" action="search.aspx?">
<input class="textbox" id="search" type="text" value="" name="search" />
<button type="submit" value="search">Search</button>
I've tried the full URL http://sitename/search.aspx, I have tried search.aspx? and I have tried this as both GET and POST request but doesn't seem to work.
I wondered if this was due to having 4 websites under the same Umbraco installation but when using the macro button and textbox the correct results are shown. I have also tried setting the source to the root node of the site I wish to search but this hasn't made a difference either.
This is probably something simple I've missed but I'm wondering if there's any other configuration required when using multiple sites? The premise (I think) is the same as if I had multiple language sites and so I have followed instructions for that but no change.
Any help will be much appreciated.
Thanks to a little chat with and some help from @mbliss I've found the solution:
I changed the form to asp.net user controls so the form now looks like this:
<asp:Label ID="lblsearch" runat="server" Text="Search" />
<asp:TextBox ID="search" runat="server"/>
<asp:Button ID="btnSearch" runat="server" Text="Search"
and the button click event is now:
protected void btnSearch_Click(object sender, EventArgs e)
Response.Redirect("search.aspx?search=" + search.Text);
In case anyone else has a similar issue
Great that you got it working Richard.
P.S. You can mark your own post as the solution
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted