Share via


SearchBox.ContextSensitiveScopeType Property

This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. For Enterprise Search in Microsoft Office SharePoint Server 2007, use the SearchBoxEx instead. Gets or sets additional restrictions on the scope for the query run by this Web Part.

Namespace:  Microsoft.SharePoint.Portal.WebControls
Assembly:  Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property ContextSensitiveScopeType As Integer
    Get
    Set
'Usage
Dim instance As SearchBox
Dim value As Integer

value = instance.ContextSensitiveScopeType

instance.ContextSensitiveScopeType = value
[BrowsableAttribute(false)]
[WebPartStorageAttribute(Storage.Shared)]
public int ContextSensitiveScopeType { get; set; }

Property Value

Type: System.Int32
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 restrictions on search scope.

1

Sets search scope to the current area and its subareas. "This topic" is added to the search scopes list.

2

Sets search scope to the current folder. "This folder" is added to the search scope list.

3

Sets search scope to the current personal site or user profile. "This personal site" is added to the search scope list.

4

Sets 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.

See Also

Reference

SearchBox Class

SearchBox Members

Microsoft.SharePoint.Portal.WebControls Namespace