F
Fernando Chilvarguer
I'm sure this has come up before but I could not find any post on it.
How can I read a variable or property that has been set on a ASPX page from
inside a ASCX control.
ASPX code:
public partial class MyClass: System.Web.UI.Page
{
protected string _companyID;
public string CompanyID
{
get
{
return _companyID;
}
set
{
_companyID = value;
}
}
.....etc...
ASCX code:
public partial class Controls_MyControl: System.Web.UI.UserControl,
IPostBackDataHandler
{
protected void Page_Load(object sender, EventArgs e)
{
Page callingPage = (Page) this.Page;
//How to read the "CompanyID" property from the calling page??
}
Thanks,
Fernando
How can I read a variable or property that has been set on a ASPX page from
inside a ASCX control.
ASPX code:
public partial class MyClass: System.Web.UI.Page
{
protected string _companyID;
public string CompanyID
{
get
{
return _companyID;
}
set
{
_companyID = value;
}
}
.....etc...
ASCX code:
public partial class Controls_MyControl: System.Web.UI.UserControl,
IPostBackDataHandler
{
protected void Page_Load(object sender, EventArgs e)
{
Page callingPage = (Page) this.Page;
//How to read the "CompanyID" property from the calling page??
}
Thanks,
Fernando