L
Lubomir
Hi,
I want to use a user control on my page. I want to reference to the control
class from the page’s code-behind.
I registered the control:
<%@ Register TagPrefix="uc1" TagName="ButtonList" Src="ButtonList.ascx" %>
The control is used in HTML code:
<uc1:ButtonList id="ButtonList" runat="server"></uc1:ButtonList>
In code-behind I access the control’s class:
public ButtonList initialStrip;
However, I get compiler error, namespace name “ButtonList†could not be found.
I am using the following directives in control’s aspx file:
<%@ Control Language="C#" Inherits="ButtonListCtrl.ButtonList"
Codebehind="ButtonList.ascx"%>
Control’s code-behind is:
namespace ButtonListCtrl
{
public class ButtonList : System.Web.UI.UserControl
{
…
}
}
What is needed to do to make this class visible from code-behind of the
container page?
Thank you for help.
Lubomir
I want to use a user control on my page. I want to reference to the control
class from the page’s code-behind.
I registered the control:
<%@ Register TagPrefix="uc1" TagName="ButtonList" Src="ButtonList.ascx" %>
The control is used in HTML code:
<uc1:ButtonList id="ButtonList" runat="server"></uc1:ButtonList>
In code-behind I access the control’s class:
public ButtonList initialStrip;
However, I get compiler error, namespace name “ButtonList†could not be found.
I am using the following directives in control’s aspx file:
<%@ Control Language="C#" Inherits="ButtonListCtrl.ButtonList"
Codebehind="ButtonList.ascx"%>
Control’s code-behind is:
namespace ButtonListCtrl
{
public class ButtonList : System.Web.UI.UserControl
{
…
}
}
What is needed to do to make this class visible from code-behind of the
container page?
Thank you for help.
Lubomir