Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
does anyone now if it's possible (and especially how) to delete items from the recycle bin programmatically?
Or maybe recursively delete them in the first place, so they don't enter the recycle bin at all.
Deletion is done from a backoffice plugin i'm creating.
Hope to hear from someone.
martin
Document doc = new Document(123);doc.delete(true);
Document.delete() has an optional bool parameter "delete permanently". Set it to true and the document will not be sent to the recycle bin.
What Thomas says is true, as long as you're using umbraco 4.5(+)...
With umbraco 4.0.x you should call doc.delete(); twice, first time moves it to the recycle bin, second time deletes the document.
Ah great, thanks.
you guys rule.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Deleting Recycle Bin items from C#
Hi,
does anyone now if it's possible (and especially how) to delete items from the recycle bin programmatically?
Or maybe recursively delete them in the first place, so they don't enter the recycle bin at all.
Deletion is done from a backoffice plugin i'm creating.
Hope to hear from someone.
martin
Document.delete() has an optional bool parameter "delete permanently". Set it to true and the document will not be sent to the recycle bin.
What Thomas says is true, as long as you're using umbraco 4.5(+)...
With umbraco 4.0.x you should call doc.delete(); twice, first time moves it to the recycle bin, second time deletes the document.
Ah great, thanks.
you guys rule.
is working on a reply...