This topic has not yet been rated - Rate this topic

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          


Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.