Try our conversational search powered by Generative AI!

Using UserControls within MetaData Controls?


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?

Jun 14, 2012 9:29

I am assuming you have read the documentation here and are trying ti implement it.  Are you putting the dll where you codebehind lives in the bin folder of the commerce manager site.

Jun 14, 2012 20:47

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" />

Jun 14, 2012 20:59

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.




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.