Re: Accessing variables

From: David S (nospam@nospam.com)
Date: 12/04/02


From: "David S" <nospam@nospam.com>
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
necessary.

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.

--
Dave
www.DavidSolum.com
"krishna c kanthety" <kkanthety@metrobat.com> wrote in message
news:OglCD#7mCHA.2172@TK2MSFTNGP12...
> 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
>
>