Contexh.Handler - Passing values

Z

Zagor

Hi All,
I have a problem that I cannot solve and I have no idea why is happening.
This is the problem:
I have 3 web pages
first.aspx ==> second.aspx ==> third.aspx

the second page references the first page <%@ Reference Page="first.aspx"
%>

and through public properties in the first page I can easily access its
values in the second page when Server.Transfer("secondpage.aspx") occurs
from the first page without any problem.
public class SecondPageClass : System.Web.UI.Page

{

..........

public FirstPageClass fp;

private void Page_Load(object sender, System.EventArgs e)

{

if (!IsPostBack)

{

fp = (FirstPageClass)Context.Handler;

TextBox1.Text = fp.FirstName;

etc.etc.

}

.......
Now the third page references the secondpage with the same techinque but
when I try to extarct the values are always null (within the thirdpage),
they are destroy somewhere and I cannot find a way out.
the third page references the first page <%@ Reference Page="second.aspx"
%> and access its values(secondpage) in the same way.

Can anybody help me , any suggestion is appreciated.
Thanks
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top