Add custom code to page type save



Wanted to know how i can attach a function to the save page event and write my custom



tried to overide the save page but it worked for one time and now nada

 using CMS 5 R2 SP2


Aug 13, 2009 13:32
any1 ?
Aug 18, 2009 12:47

DataFactory.Instance has the events you are looking for.

First, register for this event in Application_Start to add initialization code in your app:


In that event, then attach to this event and do your magic from there:



Aug 19, 2009 11:08

10x for the replay.


when i attach to this event it is in the global.asax and not in my page type

how do i get this handler to my page type also


Aug 19, 2009 14:16

The event args contains the page being saved.


Aug 19, 2009 14:28

The eventhandler of the saving is called in the global asax and i want the event handler in my page where the developer will write the code.

i can check the page type in global asax but i want just the single page type to get the save event


Aug 19, 2009 15:07
I am not sure I understand what you mean with having the "in my page". Are you refering to the webform template or ?
Aug 19, 2009 15:30

Webform ( the aspx ) is the same in the template, no ?

the Scenarioio is -> i want to get values from serverl properties and save them in an external DB

when the content editor saves the page



Aug 19, 2009 16:26

Ah ok, I mean the event handler can be a static method in any class so you can put it anywhere you feel is best in your solution. You just need the bootstrap in Application_Start since it is global and should only be initialized once.


Aug 19, 2009 16:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.