|
Home > Archive > Microsoft Content Management Server > September 2005 > Using Events
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Simon Zeeck 2005-09-26, 6:00 pm |
| Hi,
Is there an example of how to catch the Appove or change event for a
specific template. I want to present a drop down with categories for news in
edit mode.
Then when the user saves the page the category should be saved in a costom
property.
please point me to an examples for using such an event
| |
| Stefan [MSFT] 2005-09-26, 6:00 pm |
| Hi Simon,
you need to implement the CmsPosting_Approving/CmsPosting_Approving event
handler in global.asax.cs or in a http module.
Then you could check the template of the posting to decide which action to
do.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Simon Zeeck" <Simon Zeeck@discussions.microsoft.com> wrote in message
news:EC666005-FCCC-47CF-AE38-30A949048C72@microsoft.com...
> Hi,
> Is there an example of how to catch the Appove or change event for a
> specific template. I want to present a drop down with categories for news
> in
> edit mode.
>
> Then when the user saves the page the category should be saved in a costom
> property.
>
> please point me to an examples for using such an event
| |
| Simon Zeeck 2005-09-27, 7:57 am |
| Hi,
Thanx. That works. Is there a reson this must be in global.asax. It woulb be
really nice to have it on the code behind for the template.
Now i must get if it the specific template that i want that is being aproved
/Simon
"Stefan [MSFT]" wrote:
> Hi Simon,
>
> you need to implement the CmsPosting_Approving/CmsPosting_Approving event
> handler in global.asax.cs or in a http module.
> Then you could check the template of the posting to decide which action to
> do.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> ----------------------
>
>
> "Simon Zeeck" <Simon Zeeck@discussions.microsoft.com> wrote in message
> news:EC666005-FCCC-47CF-AE38-30A949048C72@microsoft.com...
>
>
>
| |
| Stefan [MSFT] 2005-09-27, 5:53 pm |
| Hi Simon,
there is indeed a reason!
Even if you register this in a template the event would fire for all
postings based on all templates!
That is a global event.
Only one instance of this objects can exist.
Placing this code in code behind will cause problems as the event will be
registered multiple time - actually whenever a postings based on this
template is executed.
This will cause the code in the event to be executed multiple times - and if
you don't unregister it you will end up with an out-of-memory situation as
all memory is used up by the event handler registrations.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Simon Zeeck" <SimonZeeck@discussions.microsoft.com> wrote in message
news:1C1294A6-3054-4648-90C5-0F8CCD71172E@microsoft.com...[vbcol=seagreen]
> Hi,
>
> Thanx. That works. Is there a reson this must be in global.asax. It woulb
> be
> really nice to have it on the code behind for the template.
>
> Now i must get if it the specific template that i want that is being
> aproved
>
> /Simon
>
> "Stefan [MSFT]" wrote:
>
|
|
|
|
|