ContextSensitiveScopeType Property

The ContextSensitiveScopeType property of the SearchBox class gets or sets additional restrictions on the scope for the query run by this Web Part.

Property Value

A 32-bit signed integer search scope for this Web Part. The default value is zero.

Remarks

The ContextSensitiveScopeType property is read/write. Setting this property allows you to restrict the scope for the query run by this Web Part to the specified context in the user interface (UI).

The following table describes the valid values for this property.

Scope type Description
0 No restriction on search scope.
1 Set search scope to the current area and its subareas. "This topic" is added to the search scopes list.
2 Set search scope to the current folder. "This folder" is added to the search scope list.
3 Set search scope to the current personal site or user profile. "This personal site" is added to the search scope list.
4 Set search scope to the sites directory. When this value is set, the search engine searches the metadata for sites in the sites directory.

All negative input is reset to zero.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security