MetadataNavigationContext.SetNewContextLocation Method
Sets the current web list and folder context for metadata navigation in this web request.
Namespace: Microsoft.Office.DocumentManagement.MetadataNavigation
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Sub SetNewContextLocation ( _
web As SPWeb, _
list As SPList, _
folderUrl As String _
)
'Usage
Dim instance As MetadataNavigationContext
Dim web As SPWeb
Dim list As SPList
Dim folderUrl As String
instance.SetNewContextLocation(web, list, _
folderUrl)
public void SetNewContextLocation(
SPWeb web,
SPList list,
string folderUrl
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe new SPWeb for the context. Cannot be set to a null reference (Nothing in Visual Basic).
list
Type: Microsoft.SharePoint.SPLista null reference (Nothing in Visual Basic) or the new SPList object value for the MetadataNavigationContext object.
folderUrl
Type: System.StringString.Empty, or the server-relative URL for the SPFolder object in the context. Ignored if list is set to a null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if the web parameter value is set to a null reference (Nothing in Visual Basic). |
Remarks
The context SPWeb, SPList, and SPFolder for the metadata navigation controls values will be determined by the SPContext.Current unless they are set explicitly using this method.
See Also
Reference
MetadataNavigationContext Class
MetadataNavigationContext Members
Microsoft.Office.DocumentManagement.MetadataNavigation Namespace