Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: passing variables from page2page


Message #1 by peter@a... on Tue, 11 Mar 2003 12:27:58
How many different ways are there to pass a variable from one web page to 
another?

I know of the following:
Session object variables
Using Form GET or POST

Am I being dense, are there more (keeping it simplistic)?

I have a page which retrieves some information from a database. Following 
this a form, once submitted, calls an "action" page which as part of its 
action calls duplicate information from the database.

Is it better to retrieve from the database twice or pass the info from one 
page to the other? I imagine the former would use more resource but which 
is more reliable or better practice?
Thanks
Message #2 by "Alex Shiell, ITS, EB, SE" <alex.shiell@s...> on Tue, 11 Mar 2003 12:18:14 -0000
Don't get the info from the database again unless it may change... find some
way of caching it.  Simplest way is to use "RS.getRows()" to turn your
recordset into an array, then store the array in a session variable.

-----Original Message-----
From: peter@a... [mailto:peter@a...]
Sent: 11 March 2003 12:28
To: ASP Web HowTo
Subject: [asp_web_howto] passing variables from page2page


How many different ways are there to pass a variable from one web page to 
another?

I know of the following:
Session object variables
Using Form GET or POST

Am I being dense, are there more (keeping it simplistic)?

I have a page which retrieves some information from a database. Following 
this a form, once submitted, calls an "action" page which as part of its 
action calls duplicate information from the database.

Is it better to retrieve from the database twice or pass the info from one 
page to the other? I imagine the former would use more resource but which 
is more reliable or better practice?
Thanks

________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com

Headquarters Address & Contact Numbers

150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel:  +44 (0) 141 248 2700.
Fax:  +44 (0)141 221 3217

 This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.


Message #3 by "Peter Alldis" <peter@a...> on Tue, 11 Mar 2003 12:22:12 -0000
I somehow felt that this would come down to resource. An array. Nice idea.
Thanks.
----- Original Message -----
From: "Alex Shiell, ITS, EB, SE" <alex.shiell@s...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Tuesday, March 11, 2003 12:18 PM
Subject: [asp_web_howto] RE: passing variables from page2page


> Don't get the info from the database again unless it may change... find
some
> way of caching it.  Simplest way is to use "RS.getRows()" to turn your
> recordset into an array, then store the array in a session variable.
>
> -----Original Message-----
> From: peter@a... [mailto:peter@a...]
> Sent: 11 March 2003 12:28
> To: ASP Web HowTo
> Subject: [asp_web_howto] passing variables from page2page
>
>
> How many different ways are there to pass a variable from one web page to
> another?
>
> I know of the following:
> Session object variables
> Using Form GET or POST
>
> Am I being dense, are there more (keeping it simplistic)?
>
> I have a page which retrieves some information from a database. Following
> this a form, once submitted, calls an "action" page which as part of its
> action calls duplicate information from the database.
>
> Is it better to retrieve from the database twice or pass the info from one
> page to the other? I imagine the former would use more resource but which
> is more reliable or better practice?
> Thanks
>
> ________________________________________________________________________
> Scottish Enterprise Network
> http://www.scottish-enterprise.com
>
> Headquarters Address & Contact Numbers
>
> 150 Broomielaw
> 5 Atlantic Quay
> Glasgow
> G2 8LU.
> Tel:  +44 (0) 141 248 2700.
> Fax:  +44 (0)141 221 3217
>
>  This message is sent in confidence for the addressee only.
> It may contain legally privileged information. The contents are not to
> be disclosed to anyone other than the addressee. Unauthorised recipients
> are requested to preserve this confidentiality and to advise the sender
> immediately of any error in transmission.
>
>
>
>


  Return to Index