help

  • Thread starter Thread starter Darren Spooner
  • Start date Start date
D

Darren Spooner

i have some data that needs to be passed between several web pages
webpage1 passes data A to webpage2 and then webpage2 passes data A to
webpage3 and then webpage3 passes data A to webpage2.

what is the best way to do this??
 
As I'm sure you know there are a number of ways. The first one that comes to
mind for your example is to add the data to the Session object.

-Darrin
 
You can also use the Request.Params["<URL parameter"].
For example:
www.yoursite.com/webpage2.aspx?passingdata=data&passingdata2=data2

In your code...
if( Request.Params["passingdata"] != null )
variable = Request.Params["passingdata"].ToString();

then when you pass to webpage3...
Response.Request("http://www.yoursite.com/webpage3.aspx?passingdata=" +
variable);

But just like Darrin noted, there are a number of ways to pass info from one
page to another: Session variables, Cache, URL params, or even via
JavaScript (but this method can get a little complicated.)

Hope this helps.
 
Back
Top