Adding ActiveX to Authoring Placeholder

Adding ActiveX to Authoring Placeholder

Post by jmacaula » Thu, 14 Aug 2003 20:23:22


I've written a custom placeholder which renders a drop down list from
some XML. I've also written an ActiveX control (a listbox with a
textbox and an add and remove button) - this control generates XML. My
question is - How can I add this activeX component as an Authoring
Child Control of my placeholder ?

I've tried using authoringContainer.Controls.Add but this expects a
Web User Control and not the Windows User control that I've written.

Thanks in advance

Jim
 
 
 

Adding ActiveX to Authoring Placeholder

Post by Stefan [MS » Thu, 14 Aug 2003 21:58:02

Hi BeerBoy,

the active X control is a client side control why a placeholder server
control (as the name indicates) is a server side control.
So you need to render some html code to include the object tags of the
active x placeholder control and also some javascript code to copy the
content of the active x control to a text input field before posting the
content as content of an active-x control cannot be sent to the server.

Cheers,
Stefan.

 
 
 

Adding ActiveX to Authoring Placeholder

Post by BeerBo » Thu, 14 Aug 2003 22:41:43

Hi Stefan,

What confuses me is that the image placeholder is an active-x component and
it works ok.

Also, I had already tried what you suggested but the problem comes when you
try to render html.
I render the object OK and the textfield, and the object fills the text
field ok but in the 'SavePlaceholderContent' call back I cannot access the
textfield - i.e. Request object is out of scope ??? I also thought about
putting in a server control textbox - but that wont work because the html
rendered is not then preprocessed before sending and the browser obviously
doesn't know about <asp:> tags.

Am I actually going about this the right way ?