Re: Accessing variables

From: David S (
Date: 12/04/02

From: "David S" <>
Date: Wed, 4 Dec 2002 11:13:46 -0700

If you are using Server.Transfer or Server.Execute to control the
first.aspx->second.aspx->third.aspx flow, you can use the Context property.
To write a value to it from your first page:

Context.Items("someKey") = <someValue>

You can then read the value from your third page by referring to
Context.Items("someKey"), converting it to the specific data type as

If the flow from first.aspx->second.aspx->third.aspx happens any other way,
I think the Session property is probably your best bet. Its use is very
similar to that of Context. I hope that helps you.

"krishna c kanthety" <> wrote in message
> Hi All,
> i am trying to access the values in the variables that are defined in my
> start page, from a third page..
> first.aspx->second.aspx->third.aspx
> now i am trying to access the values  in first.aspx into third.aspx
> directly..i used the following code.
> fp1 = CType(context.Handler, first)..but its givin me a null object
> reference error..any ideas???
> thanks in advance..KC