Sdílet prostřednictvím


MetadataDefaults Class

Provides a way to set and get default values for fields based on where the document is added.

Inheritance Hierarchy

System.Object
  Microsoft.Office.DocumentManagement.MetadataDefaults

Namespace:  Microsoft.Office.DocumentManagement
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)

Syntax

'Declaration
Public Class MetadataDefaults
'Usage
Dim instance As MetadataDefaults
public class MetadataDefaults

Remarks

This class is a wrapper around a settings file stored in a document library's Forms folder.

The settings file contains default values for fields based on where the document is added. This class provides methods to get, set, and remove these defaults and apply them to a SPListItem object.

To create a MetadataDefaults object for a list, either create a new MetadataDefaults object by passing an SPList object, or by passing a server-relative list URL and an SPWeb object.

This class is only available for use on SPDocumentLibrary objects.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

MetadataDefaults Members

Microsoft.Office.DocumentManagement Namespace