PortalApplication.GetContext, méthode (PortalSite, PortalZone) (Microsoft.SharePoint.Portal)
Gets a reference to a PortalContext object that represents the current application context for the specified portal site and portal zone.
Espace de noms : Microsoft.SharePoint.Portal
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
Public Shared Function GetContext ( _
site As PortalSite, _
zone As PortalZone _
) As PortalContext
'Utilisation
Dim site As PortalSite
Dim zone As PortalZone
Dim returnValue As PortalContext
returnValue = PortalApplication.GetContext(site, zone)
public static PortalContext GetContext (
PortalSite site,
PortalZone zone
)
Paramètres
- site
A PortalSite object that represents a portal site.
- zone
A member of the PortalZone enumeration that represents the portal zone.
Valeur de retour
A PortalContext that represents the current application context.
Remarques
The following table describes the exception types.
Exception Type |
Condition |
---|---|
InvalidOperationException |
The System.Web.HttpContext.Current static property is null. |
Voir aussi
Référence
PortalApplication, classe
Membres PortalApplication
Microsoft.SharePoint.Portal, espace de noms