Hi All,
I have a user control named "Header.ascx", which is the header for my website, within this control there is a leftPanel Panel. In the codebehind for this control I have added the line
System.Web.UI.UserControl SubMenu;
then in the page load I have:
if (SubMenu != null)
{
leftPanel.Controls.Add(SubMenu);
}
So the idea is that, in default.aspx I can include the header control:
<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="Bleh.Default" %>
<%@ Register TagPrefix="Bleh" TagName="Header" Src="Controls/Header.ascx" %>
<Bleh:Header runat="server"></Bleh:Header>
And it adds the Header usercontrol to the default.aspx page..but now I face the problem of setting Header.aspx's SubMenu property..
The point of this is that different pages have different submenus, so I need to be able to change it.
Any ideas how I can set the Header controls SubMenu property when adding it to Default.aspx?
Thanks,
Matt.
I have a user control named "Header.ascx", which is the header for my website, within this control there is a leftPanel Panel. In the codebehind for this control I have added the line
System.Web.UI.UserControl SubMenu;
then in the page load I have:
if (SubMenu != null)
{
leftPanel.Controls.Add(SubMenu);
}
So the idea is that, in default.aspx I can include the header control:
<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="Bleh.Default" %>
<%@ Register TagPrefix="Bleh" TagName="Header" Src="Controls/Header.ascx" %>
<Bleh:Header runat="server"></Bleh:Header>
And it adds the Header usercontrol to the default.aspx page..but now I face the problem of setting Header.aspx's SubMenu property..
The point of this is that different pages have different submenus, so I need to be able to change it.
Any ideas how I can set the Header controls SubMenu property when adding it to Default.aspx?
Thanks,
Matt.