Using UserControls within MetaData Controls?

Vote:
 

In the commerce ui, we have a custom metadata control in the CommerceManager\Shared\Apps\Core\MetaData\Controls folder.

When we try to use custom user controls from within the metadata control, they are rendered empty. The user control is implemented in the CommerceManager project. The custom user control is located correctly in the assembly registered at the top of the metadata control. (If we try to use a control that doesn't exist in that namespace there's an ysod.)

Using built in controls like input or label works fine.

Why is the custom controls not rendering?

#59518
Jun 14, 2012 9:29
Vote:
 

I am assuming you have read the documentation here http://sdk.episerver.com/commerce/1.1.2/Content/Developers%20Guide/Architecture/ExtendCustomizeMetaFieldControls.htm and are trying ti implement it.  Are you putting the dll where you codebehind lives in the bin folder of the commerce manager site.

#59538
Jun 14, 2012 20:47
Vote:
 

Hi Mark,

as far as that documentation it works fine. The problem is when I use a custom control within one of those controls.

The implementation is in the commerce manager project, so yes.

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyMetaField.LongHtmlStringControl.ascx.cs" Inherits="MyCompany.MyProject.CommerceManager.FrameworkApps.Core.Metadata.Controls.MyMetaField_LongHtmlControl" %>
<%@ Register TagPrefix="MyProject" Assembly="MyCompany.MyProject.CommerceManager" Namespace="MyCompany.MyProject.CommerceManager.Modules.MyModule" %>

<asp:TextBox ID="thisWorks" runat="server"></asp:TextBox>

<MyProject:WebFormDesigner ID="thisNeverShows" runat="server" />

#59539
Jun 14, 2012 20:59
Vote:
 

I just did a test to call a ccustom control from another assembly and I was able to get it to work just fine.  Is your control just a class and not a user control becasue you are not registering the source of the ascx.

 

 

 

#59559
Jun 15, 2012 19:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.