共用方式為


SafeControl Element (Solution)

Applies to: SharePoint Foundation 2010

Adds or removes a control assembly from the safe controls list for a solution.

<SafeControl
  Assembly = "Text"
  Namespace = "Text"
  Safe = "TRUE" | "FALSE"
  SafeAgainstScript = "TRUE" | "FALSE"
  TypeName = "Text">
</SafeControl>

Attributes

Attribute

Description

Assembly

Optional Text. The name of the control assembly.

Namespace

Optional Text. The namespace associated with the assembly.

Safe

Optional Boolean. TRUE to add the control to the safe controls list; FALSE to remove it.

SafeAgainstScript

Optional Boolean. TRUE to allow property editing by a Contributor; FALSE to disable property editing for Contributors.

TypeName

Optional Text. The control type.

Child Elements

None

Parent Elements

SafeControls

Example

For an example of how this element is used, see Solution Schema.