Passing Server Control Values Between Pages

M

Matt M

Ok. So I'm passing values between web pages, as per microsoft's framework
development guide
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/ht
ml/cpconPassingServerControlValuesBetweenPages.asp)

So, I have two pages, one that has some public properties and fires a
Server.Transfer("receivepage.aspx");

The receivepage.aspx can then get some of the public properties I've set on
the first page.

What I really want to be able to do is call the receivepage.aspx from a
variety of other pages. I am confused a little, because in the receivepage
you have to reference the sending page

i.e.

public sendingpage callPage;

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

{


if (!IsPostBack)

{

callPage = (sendingpage) Context.Handler;

}

How can I dynamically choose which page I want to reference? Is it
possible? Thanks for any help.

= matt =
 
M

Matt M

Perfect. Thank you very much. I'm a little new to .NET and C# for that
matter, so I will do your first option. I'm not too clear on the "deriving
from a base class" part.

Thanks.

- matt -
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top