I am not 100% sure, but I think that if you have duplicate file names in the structure, it will use the first one it finds. Maybe you can try by using different page names to see if that is the issue?
If it is, then maybe you can turn your user control into a macro with a property "SearchResult" of type content picker, so that in site 1, you can point explicitely to the search result page 1, and in site 2 to the search result page 2. And in your code behind in can then redirect to the correct page.
If you define the hostnames this should correct the problem, basically both of your results.aspx files have the same URL, and so it will always go to the first one. Once you define the hsotnames for both your websites it should give them extra URLs and this should fix the problem.
Search results problem
Hello,
i have two websites in my content like this..
Content
>>Web1
>>Web2
I am using same user control for both the sites which has search text box & a button.
User Control redirects to the Results.aspx page....
var searchTerm = searchTextTop.Text.Trim();
Response.Redirect(string.Format("~/Results.aspx?s={0}", searchTerm));
Both the webs has a Results.aspx page inside it.
When i search in any of sites it redirects to the Results.aspx page of 1st site only ......which is not expected.....
what to do to avoide this ....
Hello,
I am not 100% sure, but I think that if you have duplicate file names in the structure, it will use the first one it finds. Maybe you can try by using different page names to see if that is the issue?
If it is, then maybe you can turn your user control into a macro with a property "SearchResult" of type content picker, so that in site 1, you can point explicitely to the search result page 1, and in site 2 to the search result page 2. And in your code behind in can then redirect to the correct page.
Hope this helps.
Cheers,
Michael.
Thnax for reply ....
I really dident understood that what you wnt to say .....
my Results.aspx calls ons xslt which finds the matches & displayes the results ......
Can u explain it in more details plz so that i can do changes according to that ....
Thnax for reply ....
I really dident understood that what you wnt to say .....
my Results.aspx calls ons xslt which finds the matches & displayes the results ......
Can u explain it in more details plz so that i can do changes according to that ....
Hello,
Now that I think of it, the issue might be simpler. Have you defined hostnames on your web roots?
Also, you need to change the following line in the umbracoSettings.config file in the config folder to true.
<useDomainPrefixes>false</useDomainPrefixes>
Hope this helps.
Michael.
I have not defined hostnames yet ....is that will solve this problem ??
I changed useDomainPrefixes to true but the problem is same ...
Hi
If you define the hostnames this should correct the problem, basically both of your results.aspx files have the same URL, and so it will always go to the first one. Once you define the hsotnames for both your websites it should give them extra URLs and this should fix the problem.
Hope this helps
is working on a reply...