0

After adding a registered ASP.NET user control to promotion, published page displays .net registered code on page, as opposed to the executed code. Is it possible to execute the user control this way, or would it need to be done via REL/published to database or some other approach? Wondering if issue occurs because IIS is recognizing control as text.

Environment details are:

  • Tridion 2013 SP1 HR1
  • Smart Target 2014 SP1
  • .net presentation webapp

Further details:

  • API server role has been installed as a .NET web application
  • In the Deployer, the user control is being sent to the filesystem, and the user control is published in ASCX format.
  • If the ASP.NET user control is put outside of the promotion, it executes on page load.

Simplified code sample as below

<div class="class_abc">
<%@ Register Src="~/Content/UserControls/control_ABC.ascx" 
TagName="tagname_abc" TagPrefix="ABC" %>
<ABC:tagname_abc id="id_abc" runat="server" />
</div>
0

Experience Optimization controls are templated controls that will render the content of the ItemTemplate for each item. The default TBBS output a tridion:componentPresentation inside of that, but can be changed.
OOTB, a user control cannot be rendered through a tridion:ComponentPresentation, as it does not evaluate the content and so the user control will not be part of the control tree. Generally speaking, best practice is to avoid having server controls in Dynamic Component Presentations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.