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.StringThe fully qualified name of an assembly without the file extension.
typeName
Type: System.StringThe name of the type whose safety status is needed.
spWeb
Type: Microsoft.SharePoint.SPWebThe site for which the safety status of the type is needed.
Return Value
Type: System.Boolean
true if the type is safe for spWeb; otherwise, false.