[thelist] Passing variables between aspx pages

Matt Warden mwarden at gmail.com
Tue Aug 17 19:45:58 CDT 2004


On Wed, 18 Aug 2004 01:24:40 +0100, Jason Robbins
<evolt at whisky-fudge.org.uk> wrote:
> The only thing I've found (but been confused by) is Server.Transfer, is
> this a suitable way? If so does anyone have any good links to explain
> it, MSDN description isn't all that good. 

Server.Transfer is simply a server-side Response.Redirect.

If you are familiar with mod_rewrite, it's somewhat on the same lines as that.

Basically, the user sends a request for A.aspx which does its thing
and then issues a Server.Transfer to B.aspx. Everything in the Request
object is then available to B.aspx as if the original request was for
B.aspx. There is no second request and no communication to the client,
as there would be with a Response.Redirect.

> Or does anyone know of another
> way?

You could store it in a session variable if it's a temporary thing.
Or, probably better, in a database (flat file or otherwise, depending
on what you're doing).

-- 
mattwarden
mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list