Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

FindOptions.SearchContext Property

FindOptions.SearchContext Property

The number representing the Entity.ID property of the geographic area to which the search should be limited. Overrides the UserInfoFindHeader.Context property.

Public SearchContext As System.Integer

public System.Int32 SearchContext;



[Visual Basic]

'Search in only Canada
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Vancouver"
findSpec.Options = New FindOptions()
findSpec.Options.SearchContext = 39

Dim foundResults As FindResults
foundResults = findService.Find(findSpec)

Dim fr As FindResult
For Each fr In foundResults.Results


//Search in only Canada
FindSpecification findSpec  = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Vancouver";
findSpec.Options = new FindOptions();
findSpec.Options.SearchContext = 39;

FindResults foundResults;
foundResults = findService.Find(findSpec);

foreach(FindResult fr in foundResults.Results)

See Also

  FindOptions Class   |   Entity.ID Property   |   UserInfoFindHeader.Context Property   |   FindServiceSoap.Find Method   |   FindResult.FoundLocation Property  

© 2015 Microsoft