Hi I tried paying around with the ids but with no success. I am not sure what to do with the OnContentLoaded and what ID should I try and change he is a snip of my code if you can help me with an example that would be great
Parent user control (web part):
<%@ Register Src="../UserControls/MenuItem.ascx" TagName="MenuItem" TagPrefix="uc1" %>
...
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<uc1:MenuItem ID="MenuItem1" runat="server" /> <uc1:MenuItem ID="MenuItem2" runat="server" />
</td>
Inner user control ues 2 times in the parent
MenuItem.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MenuItem.ascx.cs" Inherits="Dnet_UserControls_MenuItem" %>
<%@ Register Assembly="CMS.Controls" Namespace="CMS.Controls" TagPrefix="cc1" %>
<cc1:cmseditableregion id="erTopMenu" runat="server" dialogheight="40" dialogwidth="100" regiontype="HtmlEditor" regiontitle="Content" />
MenuItem.ascx.cs:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.PortalControls;
public partial class Dnet_UserControls_MenuItem : CMSAbstractWebPart
{
public override void OnContentLoaded()
{
}
protected void Page_Load(object sender, EventArgs e)
{
}
}