SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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:

And this one:

share|improve this answer
Hi Alex, thanks a lot for your help. I will try your suggestion. I will be back soon. – Helm Sterk Apr 17 '13 at 7:48
have you tried this solution? – Alex Choroshin Apr 21 '13 at 17:16
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. – Helm Sterk 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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