Thanks Kevin. That works fine. However, it sems to only work in the Page_Load
event. I'd like to be able to get at the information in other places, like in
a button click event, but it doesn't seem to work. Do you know the trick for
this, or am I being too ambitious?
--
Dave
"Kevin Spencer" wrote:
> Hi Dave,
>
> When you use Server.Transfer to transfer from one Page to another, the first
> Page remains as the HttpHandler in the Context. So, you can access any
> public value in the first Page class via something like the following:
>
> FirstPageClass firstpage;
> if (!IsPostBack) // Via Server.Transfer
> {
> firstpage = (FirstPageClass)Context.Handler;
> }
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Everybody picks their nose,
> But some people are better at hiding it.
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:972699D4-827E-4668-805E-(E-Mail Removed)...
> > I'm fairly new to this ASPX/OLEDB stuff. I have an OleDbDataReader in one
> > .aspx page. I do a Server.Transfer to another page. Is it possible to make
> > it
> > so that the data in the OleDbDataReader is available to the other page, so
> > I
> > don't have to go back to the database?
> > --
> > Dave
>
>
>
|