Gets the ID of the master that was used to create this item.
A master is an instance of a template much like an item. When an item is created from a master, the master is copied into the new item which receives all the field values from the master. A master may contain subitems that are created whenever an item is created from a master.
An ID identifies an object within the system, but not uniquely. The underlying data of an ID is a Guid.
The following example retrieves the master item. This can also be done by using the Master property.
{{
public MasterItem GetMaster(Item item) {
MasterItem result = item.Database.Masters[item.MasterID];
return result;
}
}}
Item Class | Sitecore.Data.Items Namespace