Hi All,
Before i get into things I'm writing in C# using VS2003 with framework 1.1.
I am having a problem accessing a user control in the code behind.
I'm using the user control for some repetitive code and i need to access a public property.
.aspx
[code=asp]
<%@ Register TagPrefix="uc" TagName="Activi ty" Src="includes\i nc_Activity.asc x" %>
<uc:ACTIVITY id="Activity1" runat="server" src="blank.html "></uc:ACTIVITY>
[/code]
.aspx.cs
[code=cpp]
public class client : System.Web.UI.P age
{
protected ACTIVITY Activity1;
//...
private void Page_Load(objec t sender, System.EventArg s e)
{
Activity1.sPage = "Client";
//...
[/code]
.ascx.cs
[code=cpp]
private string _sPage;
public string sPage
{
get {
return _sPage;
}
set {
sPage = value;
}
}
[/code]
Error when compiling;
The type or namespace name 'ACTIVITY' could not be found (are you missing a using directive or an assembly reference?)
Any help would be much appreciated!
Before i get into things I'm writing in C# using VS2003 with framework 1.1.
I am having a problem accessing a user control in the code behind.
I'm using the user control for some repetitive code and i need to access a public property.
.aspx
[code=asp]
<%@ Register TagPrefix="uc" TagName="Activi ty" Src="includes\i nc_Activity.asc x" %>
<uc:ACTIVITY id="Activity1" runat="server" src="blank.html "></uc:ACTIVITY>
[/code]
.aspx.cs
[code=cpp]
public class client : System.Web.UI.P age
{
protected ACTIVITY Activity1;
//...
private void Page_Load(objec t sender, System.EventArg s e)
{
Activity1.sPage = "Client";
//...
[/code]
.ascx.cs
[code=cpp]
private string _sPage;
public string sPage
{
get {
return _sPage;
}
set {
sPage = value;
}
}
[/code]
Error when compiling;
The type or namespace name 'ACTIVITY' could not be found (are you missing a using directive or an assembly reference?)
Any help would be much appreciated!
Comment