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

In one of my custom master page template, I have a text box where a user can search various documents from different sources (which have already being crawled...), I want to programmatically provide the search string into advanced search feature and retrieve the results and display them in my custom view. How can I access advanced search using C# and carry out what I intended. Any help would be highly appreciable.

Thanks in advance.

share|improve this question

You can call the search API directly using Query objects:

You have two options here: FullTextSQLQuery which gives you a very robust set of options and the KeywordQuery which is a simplified search. In both cases you can fully customize the display of the results.

If you generally like the normal SearchCoreResults Webpart it is also possible to override that and implement some customizations there.

share|improve this answer

Your Answer


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