The event is registered. The instructions to register are to " use the CMSModuleLoader partial class in the App_Code folder" which is included in my code. Maybe there is something else I am missing?
I am able to get the above code to work when changes are made to the data from within the CMS > Custom tables > table name > data however when I update the data on a page using the custom table form web part it does not catch the event. I need the insert/update/delete events to be caught no matter where the data is modified from.
For now I have resolved this issue by cloning the custom table form web part (CMSWebParts/CustomTables/CustomTableForm.ascx) and then manipulating the data in the form_OnAfterSave method. Ideally I would catch all custom table events so if anybody else has any suggestions for making this work in App_Code ....
protected override void OnLoad(EventArgs e)
{
form.OnAfterSave += form_OnAfterSave;
form.OnBeforeSave += form_OnBeforeSave;
base.OnLoad(e);
}
protected void form_OnAfterSave(object sender, EventArgs e)
{
}