Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

simple question... In visual studio, how would i programmatically set my custom xslt to the search results webpart?

thanks

share|improve this question

1 Answer

Are you creating your own version of the CSRWP? Or are you customizing a webpart on an existing page?

For both cases, you have to modify the ItemXslLink, and set it to the link to your xslt.

If it's the second case, you can use the SPWeb.GetLimitedWebPartManager to change the properties of a webpart on an existing page.

share|improve this answer
My search center is located to another site collection. The webpart for people search is PeopleCoreResultsWebPart and for the general search CoreResultsWebPar – user1833 Mar 1 '11 at 13:20

Your Answer

 
discard

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