Sitecore 5.0 API

Item.Delete Method 

Deletes the item.

[Visual Basic]
Public Sub Delete()
[C#]
public void Delete();

Remarks

This permanently deletes the item. To put the item in the Recycle Bin, use the Recycle method.

Example

The following example permanently deletes an item from the database.

{{{
public bool DeleteItem(Item item, string userResponse) {
  if (userResponse == "yes") {
    item.Delete();
    return true;
  }
  return false;
}
}}}

See Also

Item Class | Sitecore.Data.Items Namespace