I would like to use code behind to set the search settings of my site:
- The Site Collection Search Center Url
- Site Collection Search Dropdown Mode: Show Scopes Dropdown
Any ideas on how to implement this?
This is done by modifying properties on the Root Web property bag. Here's a PowerShell sample that I've used to set the same settings on all site collections:
The easiest way to find out what values you should be using is to configure one site collection and then use SharePoint Designer to inspect the properties (Ribbon > Manage > Site Options)