J
Jonathan Wood
In Microsoft Press' Introducing Microsoft ASP.NET 2.0, and also on sites
like http://msdn2.microsoft.com/en-us/library/ms178139.aspx, I've found a
number of examples that look something like this:
if (Page.PreviousPage != null)
{
TextBox SourceTextBox = (TextBox)PreviousPage.FindControl("TextBox1");
if (SourceTextBox != null)
{
Label1.Text = SourceTextBox.Text;
}
}
Yet, PreviousPage.FindControl always returns null for me. Using
PreviousPage.Title, I could verify that the previous page was the expected
page. But FindControl() isn't working.
I searched the Web but all I could really find is examples like the one
above, and posts where other people complained that this code does not work
for them either.
Any help?
Jonathan
like http://msdn2.microsoft.com/en-us/library/ms178139.aspx, I've found a
number of examples that look something like this:
if (Page.PreviousPage != null)
{
TextBox SourceTextBox = (TextBox)PreviousPage.FindControl("TextBox1");
if (SourceTextBox != null)
{
Label1.Text = SourceTextBox.Text;
}
}
Yet, PreviousPage.FindControl always returns null for me. Using
PreviousPage.Title, I could verify that the previous page was the expected
page. But FindControl() isn't working.
I searched the Web but all I could really find is examples like the one
above, and posts where other people complained that this code does not work
for them either.
Any help?
Jonathan