G
Gerald
Hi all,
I have a aspx page that inherits from a cs class which is common for all
pages in my application.
In that cs file, I define some veriable.
IE:
the webBasePage.cs:
namespace MyAPP{
public class myWebBase : System.Web.UI.Page {
public String myVar = "I'm there";
}
}
Then I have the page:
namespace myAPP{
public class pageTemplate : myWebBase {
.......
}
}
Now I have a user control I add dynamically into the page:
namespace myAPP.controls{
public class clsWebBaseControl : System.Web.UI.UserControl {
//I would like to be able to access the variable "myVar" I declared in
the first cs file.
}
}
How ca I do that.
I tried : Parent.Page.myVar but it is not recognised.
Could someone help me?
Thanks
Gerald
I have a aspx page that inherits from a cs class which is common for all
pages in my application.
In that cs file, I define some veriable.
IE:
the webBasePage.cs:
namespace MyAPP{
public class myWebBase : System.Web.UI.Page {
public String myVar = "I'm there";
}
}
Then I have the page:
namespace myAPP{
public class pageTemplate : myWebBase {
.......
}
}
Now I have a user control I add dynamically into the page:
namespace myAPP.controls{
public class clsWebBaseControl : System.Web.UI.UserControl {
//I would like to be able to access the variable "myVar" I declared in
the first cs file.
}
}
How ca I do that.
I tried : Parent.Page.myVar but it is not recognised.
Could someone help me?
Thanks
Gerald