D
Dan Aldean
Hi,
2 web pages, One of them has properties that I need to read in a second
form:
First Form
public class FirstForm : System.Web.UI.Page
{
private void submitButton_Click(......)
{
Server.Transfer("SecondForm.aspx")
}
public string UserName //property
{
get
{
return userName.Text; //textbox
}
}
}
-------------------------------
Second form
public class SecondForm
{
public FirstForm firstForm;
private void Page_Load(...)
{
firstForm = (FirstForm) Context.Handler;
userGreeting.Text = firstForm.UserName;
}
}
The problem is that on the real project it does not work.
public FirstForm firstForm;
issues an error, it doesn't know what FirstForm is.
What do I miss?
Thanks
2 web pages, One of them has properties that I need to read in a second
form:
First Form
public class FirstForm : System.Web.UI.Page
{
private void submitButton_Click(......)
{
Server.Transfer("SecondForm.aspx")
}
public string UserName //property
{
get
{
return userName.Text; //textbox
}
}
}
-------------------------------
Second form
public class SecondForm
{
public FirstForm firstForm;
private void Page_Load(...)
{
firstForm = (FirstForm) Context.Handler;
userGreeting.Text = firstForm.UserName;
}
}
The problem is that on the real project it does not work.
public FirstForm firstForm;
issues an error, it doesn't know what FirstForm is.
What do I miss?
Thanks