catching the save event

catching the save event

Post by Tmlrb2xha » Wed, 15 Dec 2004 00:05:04


I have a usercontrol which is placed on a template. Can I catch an event and
call a method in this user control when the posting is saved.

I'm sort of implementing my own variant of a placeholder control. One of the
main differences is that I do not bind it to a placeholder definition but I
save content by other means. It is not a problem to implement something like
the CreatePresentationChildControls method (or the
CreateAuthoringChildControls) and the LoadContent methods, but how do I
implement something like the SavePlaceholderContent method?

Thanks
Nikolaj
 
 
 

catching the save event

Post by Stefan [MS » Wed, 15 Dec 2004 00:25:07

Hi Nikolaj,

this is possible.
See the sample on how to register the events:
http://www.yqcomputer.com/

Cheers,
Stefan.



and
the
I
like

 
 
 

catching the save event

Post by Tmlrb2xha » Wed, 15 Dec 2004 00:59:02

Thanks! Now I can catch the event, but a bit too late. I have loaded a
usercontrol in authoring mode which contains some check boxes. It is the
content of these check boxes I need to save. But when my SaveContent method
is invoked the usercontrol is null. How does a "real" placeholdecontrol do
this trick? Has it got something to do with the EnsureChildControls method?
 
 
 

catching the save event

Post by Stefan [MS » Wed, 15 Dec 2004 01:16:05

Hi Nikolaj,

yes the ensurechildcontrols method is required.
But you could also extract the content from the Request.Form array.

Cheers,
Stefan.



method
method?



event
of
but
something
I