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'm in a process of extending CoreResultsWebPart - I'm trying to create something like "Who is Blogging" to show you most recent blogs from people. Following properties will be changed - so that when used it will be set as default.

  1. XslLink (Done)
  2. Location (to only Local Search Results)
  3. Sorting

I'm unable to find how to setup Location. There is a property called Location which takes string. However I have tried with "LocalSearchResults" and I't doesn't work.

This is my code so far:

public class WhosBloggingWebPart : CoreResultsWebPart
        protected override void OnInit(EventArgs e)

            base.UseLocationVisualization = false;
            base.XslLink = @"/Style%20Library/XSL%20Style%20Sheets/WhosBloggingModule/WhosBloggingXSLT.xslt";

            this.Location = "LocalSearchResults";
            this.FixedQuery = "contenttype:post AND NOT Title:\"Welcome to your Blog!\" AND url:\"*/site/*\"";
            this.QueryNumber = QueryId.Query2;

            this.DefaultSort = ResultsView.Modified_Date;
share|improve this question
up vote 1 down vote accepted

Set the location value to LocalSearchIndex

this.Location = "LocalSearchIndex";
share|improve this answer
How do you know this? I spend hours going over msdn and couldn't find anything. – Luke Aug 2 '12 at 21:18
@Luke I read the location property into a string variable then debuged the web part and watched the value as I set the property of the web part in the UI. – Aquila Sands Aug 3 '12 at 7:14
Nice. Good idea! I though it is actually documented somewhere. – Luke Aug 5 '12 at 21:14

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.