Here is a simple illustration:
Your first page:
public class FirstPage: System.Web.UI.Page
{
public int MyInt
{
get
{
return (1);
}
}
}
Your second page:
public class SecondPage: System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
int myParentInt;
FirstPage myParentPage;
myParentPage = (FirstPage)Current.Handler;
myParentInt = myParentPage.MyInt;
}
}
0 comments:
Post a Comment