is it possible to use sharepoint server-side code inside the search core web part xstl? I have to join the search web part data and data from a custom list.

I am trying to achieve this functionality:

enter image description here


You can't use server side code inside the xslt. The only way to achieve your goal is by extending the core search web part.

By extending the core search results web part you can take control over the query (using server side code) and make your own query or just append your query using FQL (Fast Query Language) or keyword query. This way you can join the search web part data and data from a custom list.


    public class JoinListsCoreResultWebPart : CoreResultsWebPart
protected override void ConfigureDataSourceProperties()
        //Just Append Search Query with your query
            this.AppendedQuery = "your join query for custom list";


Check out this post: http://sqlgoogler.blogspot.co.il/2012/01/extend-search-core-result-web-part-with.html

And this one: http://consultingblogs.emc.com/mattlally/archive/2011/12/29/sharepoint-2010-custom-my-search-core-results.aspx

| improve this answer | |
  • Hi Alex, thanks a lot for your help. I will try your suggestion. I will be back soon. – Imir Hoxha Apr 17 '13 at 7:48
  • have you tried this solution? – Alex Choroshin Apr 21 '13 at 17:16
  • 1
    Hi Alex, I gave it a try but it seemed difficult to achieve it. I found another solution though that helped me. I created an xslt function and I used that in my search result web part. Thanks a lot though for your help. – Imir Hoxha Apr 22 '13 at 8:15

For anyone who might fase the same issue this is how I solved it:

I created a xslt function. I used this link create-your-own-xslt-functions-using-c. it is a long blog that is why I am not pasting any code here. However, if you need help let me know. I hope it helps someone else.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.