When publishing dynamic component presentations using SDL Tridion 2011 SP1, I mostly use REL as the output format, however I now want to publish a DCP that contains an ASP.NET control tag. I therefore changed the output format of the template to ASCX, and configured the storage for ASCX component presentations to go to the file system within my web application. I can see the ascx files on disk, and as expected, I can see the control tag inside.
If I create an aspx page that contains the same control tag, the output is as I expect, however, when the ASCX component presentation is executed by the component presentation assembler, instead of rendering the output from the control tag, it comes up blank. Plain text within the DCP does show up.
The functionality I need is very similar to a Tridion Dynamic Component link control, and I had already tried one of these with this architecture, and succeeded. I've even gone as far as putting both my tag and the tridion one, one after the other, in the template. In this case I see the output from the tridion tag, but not from my own, even though the references are wired up in the same web.config.
So I can see that it is possible to have Tridion's component presentation assembler execute an ASCX DCP and successfully render its child controls. Are there perhaps requirements when authoring such a control to ensure that it can be rendered in this way?
UPDATE:
The DCP is published to an ascx file within my site. For test purposes, I am now publishing the tridion control in the same DCP, so the output on disk looks like this:
<tridion:DynamicComponentLink PageURI="tcm:34-667-64" ComponentURI="tcm:34-876"
TemplateURI="tcm:34-864-32" LinkText="Some page" runat="server" />
<xxx:ComponentLinkQS runat="server" ComponentUri="tcm:34-945"
QueryString="item=876" Text="Some page" />
When the DCP is published like this, and executed by the ComponentPresentationAssembler the first control produces the expected output, and the second one doesn't. If I place a <xxx:ComponentLinkQS/>
tag directly on an ASPX page, it renders fine.