Sharepoint Insight by Namwar Rizvi

Sharepoint Tips, Tricks and inside knowledge from real world experience by Namwar Rizvi

How to get all available search contexts for the current site collection?

Posted by namwar on January 26, 2009


If you want to retrieve all available search contexts for the web site collection where your application is initiated then you can use the following code to get it

SearchContext searchContext = SearchContext.GetContext(ServerContext.Current);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: