I'm just trying to prevent the saving of all content as a test however when I click the save button in the back office I am still presented with a success message.
If I breakpoint I can see that the value of e.CanCancel is true so I was expecting to be able to cancel the saving process.
Is anyone able to point out the mistake I am making in this?
Can't cancel saving of content from Content API
I'm trying to cancel the saving of content using the Content Services in Umbraco 6.20.
I have the following code.
void ContentService_Saving(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.SaveEventArgs<IContent> e)
{
e.Cancel = true;
}
I'm just trying to prevent the saving of all content as a test however when I click the save button in the back office I am still presented with a success message.
If I breakpoint I can see that the value of e.CanCancel is true so I was expecting to be able to cancel the saving process.
Is anyone able to point out the mistake I am making in this?
is working on a reply...