SPContext.GetContext-Methode (HttpContext, Int32, Type)
Gibt den Kontext Microsoft SharePoint Foundation für ein Element mit der angegebenen HTTP-Kontext, die Element-ID und Elementtyp.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetContext ( _
context As HttpContext, _
itemId As Integer, _
itemType As Type _
) As SPContext
'Usage
Dim context As HttpContext
Dim itemId As Integer
Dim itemType As Type
Dim returnValue As SPContext
returnValue = SPContext.GetContext(context, _
itemId, itemType)
public static SPContext GetContext(
HttpContext context,
int itemId,
Type itemType
)
Parameter
context
Typ: System.Web.HttpContextEin System.Web.HTTPContext -Objekt, das den HTTP-spezifische Kontext kapselt, der vom Server zum Verarbeiten von Website-Anfragen verwendet wird.
itemId
Typ: System.Int32Eine 32-Bit-Ganzzahl, die das Element identifiziert.
itemType
Typ: System.TypeEine System.Type , die den Typ des Elements darstellt.
Rückgabewert
Typ: Microsoft.SharePoint.SPContext
Der SharePoint Foundation -Kontext.