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

I would like to ask if some do not face this requirement:

Client wants to have search fully configurable by taking properties from SPFarm bag. This means that he wants to set up number of results per page in search result form for example.

I overridden ConfigureDataSourceProperties method and in this method I am assigning value to ResultsPerPage property. However this is probably late because it take value that is set in the text box of web part settings. So my question is where I should set the ResultsPerPage property? I would like to ignore text in OOB Results per page text box. I also don't want to use the approach with checking-out the page, taking the web part manager etc .. Is there an option?

Thanks a lot.

share|improve this question
up vote 1 down vote accepted

well after closer look i found the solution.

var dataSource = DataSource as CoreResultsDatasource;
dataSource.ResultsPerPage = desiredResultsPerPage

I also set

this.ResultsPerPage = desiredResultsPerPage

however I dont know if this step is needed :)

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.