0

How can I programmatically assign some custom rendering xslt to a search results webpart using Visual Studio? I'm working with SharePoint 2010

1 Answer 1

2

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.

1
  • My search center is located to another site collection. The webpart for people search is PeopleCoreResultsWebPart and for the general search CoreResultsWebPar Commented Mar 1, 2011 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.