Share via


SharePointHandler.IsSafeControl Method

Returns a value that indicates whether a particular type from a specified assembly is safe for a particular site.

Namespace:  Microsoft.SharePoint.ApplicationRuntime
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function IsSafeControl ( _
    assemblyName As String, _
    typeName As String, _
    spWeb As SPWeb _
) As Boolean
'Usage
Dim assemblyName As String
Dim typeName As String
Dim spWeb As SPWeb
Dim returnValue As Boolean

returnValue = SharePointHandler.IsSafeControl(assemblyName, _
    typeName, spWeb)
public static bool IsSafeControl(
    string assemblyName,
    string typeName,
    SPWeb spWeb
)

Parameters

  • assemblyName
    Type: System.String

    The fully qualified name of an assembly without the file extension.

  • typeName
    Type: System.String

    The name of the type whose safety status is needed.

Return Value

Type: System.Boolean
true if the type is safe for spWeb; otherwise, false.

See Also

Reference

SharePointHandler Class

SharePointHandler Members

Microsoft.SharePoint.ApplicationRuntime Namespace