Export (0) Print
Expand All

SetMetadata Method

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.

// Set the element's lockItem attribute.
moduleproviderelement.SetMetadata("lockItem", true); // persisted in Administration.config          


Community Additions

ADD
Show:
© 2014 Microsoft