|
Home > Archive > Microsoft Content Management Server > June 2005 > BaseplaceholderControl events problem
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]
| Author |
BaseplaceholderControl events problem
|
|
| Leeor Chernov 2005-06-27, 2:48 am |
| Hi,
I have developed a custom placeholder - web control that inherits from
BaseplaceholderControl,
And in most of the scenes it works just fine,
but in the edit mode(The page where I can "save", or "save and exit") when I
press preview, I see the
AuthoringChildControls and PresentationChildControls, toghether..
After debugging I have found out that the both events
CreateAuthoringChildControls and CreatePresentationChildControls are raised.
How can I prevent this CreateAuthoringChildControls from being raised in
tthe preview mode??
Thanks
Leeor Chernov
..Net Architect
SPL software
| |
| Stefan [MSFT] 2005-06-27, 7:49 am |
| Hi Leeor,
there is no way to achieve this as for preview a temporary save is
required - which will load the authoring mode controls.
Then the presentation mode controls are run to do the display.
Usually this should not harm as the authoring mode and the presentation mode
containers should be different.
If not you need to ensure that the container is cleaned up before you add
new controls.
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
----------------------
"Leeor Chernov" <leeor_chernov@mod.gov.il> wrote in message
news:uxvFK2ueFHA.2844@TK2MSFTNGP14.phx.gbl...
> Hi,
> I have developed a custom placeholder - web control that inherits from
> BaseplaceholderControl,
> And in most of the scenes it works just fine,
> but in the edit mode(The page where I can "save", or "save and exit") when
> I press preview, I see the
> AuthoringChildControls and PresentationChildControls, toghether..
> After debugging I have found out that the both events
> CreateAuthoringChildControls and CreatePresentationChildControls are
> raised.
>
> How can I prevent this CreateAuthoringChildControls from being raised in
> tthe preview mode??
>
> Thanks
>
> Leeor Chernov
> .Net Architect
> SPL software
>
>
>
| |
| Leeor Chernov 2005-06-27, 7:49 am |
| Hi Stefan,
The the CreateAuthoringChildControls is called second(after
CreatePresentationChildControls)
So I am checking :
void CreateAuthoringChildControls (BaseModeContainer b)
{
if(ContainerPresentation != null)
{
//Do not create authoring control
return;
}
}
Is it ok ?
And why is the CreateAuthoringChildControls is raised on the save page
"Preview" button press,
I cant find ant sence in it ????? Especially when 2 conflicting containers
are raised...
Leeor
"Stefan [MSFT]" <stefang@online.microsoft.com> כתב
בהודעה:ON3oh3veFHA.2736@TK2MSFTNGP12.phx.gbl...
> Hi Leeor,
>
> there is no way to achieve this as for preview a temporary save is
> required - which will load the authoring mode controls.
> Then the presentation mode controls are run to do the display.
> Usually this should not harm as the authoring mode and the presentation
> mode containers should be different.
> If not you need to ensure that the container is cleaned up before you add
> new controls.
>
> 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
> ----------------------
>
>
> "Leeor Chernov" <leeor_chernov@mod.gov.il> wrote in message
> news:uxvFK2ueFHA.2844@TK2MSFTNGP14.phx.gbl...
>
>
| |
| Stefan [MSFT] 2005-06-27, 7:49 am |
| Hi Leeor,
this happens because the content has to be temporarily saved before it can
be loaded again during preview.
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
----------------------
"Leeor Chernov" <leeor_chernov@mod.gov.il> wrote in message
news:uikktiweFHA.3616@TK2MSFTNGP09.phx.gbl...
> Hi Stefan,
> The the CreateAuthoringChildControls is called second(after
> CreatePresentationChildControls)
> So I am checking :
>
> void CreateAuthoringChildControls (BaseModeContainer b)
> {
> if(ContainerPresentation != null)
> {
> //Do not create authoring control
> return;
> }
> }
> Is it ok ?
>
> And why is the CreateAuthoringChildControls is raised on the save page
> "Preview" button press,
> I cant find ant sence in it ????? Especially when 2 conflicting containers
> are raised...
>
> Leeor
>
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> כתב
> בהודעה:ON3oh3veFHA.2736@TK2MSFTNGP12.phx.gbl...
>
>
|
|
|
|
|