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
Hello Umbraco Colleagues,
Can someone please tell me how to delete a content node programmatically (as in C#, user control) and remove it from the cache?
I can't seem to find an example. (ver. 4)
Thanks,
David Hill
THis should do it for you.
This will delete it.
Document d = new Document(id);d.delete();
This will refresh the content so it disapears.
umbraco.library.RefreshContent();
Hope that helps
Peter
Thank you, Peter. That helped a lot. Exactly what I needed!
David
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Delete content node programmatically
Hello Umbraco Colleagues,
Can someone please tell me how to delete a content node programmatically (as in C#, user control) and remove it from the cache?
I can't seem to find an example. (ver. 4)
Thanks,
David Hill
THis should do it for you.
This will delete it.
This will refresh the content so it disapears.
Hope that helps
Peter
Thank you, Peter. That helped a lot. Exactly what I needed!
David
is working on a reply...