ConfigurationElement.SetMetadata Method (String, Object)

IIS 7.0
 

Sets metadata values from the element schema.

Namespace:   Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public void SetMetadata(
	string metadataType,
	object value
)

Parameters

metadataType
Type: System.String

The name of the metadata to set.

value
Type: System.Object

The new value of the metadata.

The following example sets the metadata value. The lockItem value is set to true and is persisted to the Administration.config file.

Return to top
Show: