Portal Engine
Version 2.x > Portal Engine > Custom event handlers View modes: 
User avatar
Member
Member
kogany - 11/21/2006 5:16:46 PM
   
Custom event handlers
Hi
i want use CMS to write "Custom event handlers"
i open CMS in visual Studio 2005 and add this code
to myClass

public class CatchDataSave : CMS.GlobalEventHelper.AbstractDataHandler
{

public CatchDataSave()
{

}

public void OnBeforeInsert(object dataObj, object conn) {
int a;
a = 0;

}

}

but my debbuger not execute this class
in web.config
i have <add key="CMSUseCustomHandlers" value="true"/>
but this not working
please help me

thank you
Alex


}

User avatar
Guest
admin - 11/22/2006 11:06:01 PM
   
Re: Custom event handlers
Hello,

you need to use the sample custom event handler project delivered with Kentico CMS and modify only the body of the methods. The names of the classes must remain same as shown in Developer's Guide -> Programming and API -> Global events and their handling -> Data handler.

Please let me know if you need any further help.

Best Regards,