Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Know Page Name with ServerTransfer (http://www.velocityreviews.com/forums/t73909-know-page-name-with-servertransfer.html)

Manuel Lopez 02-25-2004 11:51 AM

Know Page Name with ServerTransfer
 
Hello,

I need to know on evry request the page name, my problem is when use
the method server.transfer, i always get the name of the calling page.

I use context.Current.Request.Url, but I am always getting the first
page.

Is there a way to get the name of the transfered page?

Thanks,
Manuel

Patrice Scribe 02-25-2004 12:22 PM

Re: Know Page Name with ServerTransfer
 
Try rather the Script_Name server variables.

The Url is rather the exact url requested (which doesn't change wehn using
Server.Transfer) while Script_Name should be always IMO the current file...

--

"Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
news:cd080612.0402250351.1aa3534d@posting.google.c om...
> Hello,
>
> I need to know on evry request the page name, my problem is when use
> the method server.transfer, i always get the name of the calling page.
>
> I use context.Current.Request.Url, but I am always getting the first
> page.
>
> Is there a way to get the name of the transfered page?
>
> Thanks,
> Manuel



Manuel Lopez 02-26-2004 10:06 AM

Re: Know Page Name with ServerTransfer
 
Hello Patrice thanks for your reply,

I have tried using Request.ServerVariables("Script_Name") and I get
the same behavior when using server.transfer I always get the calling
page.

There must be a way to the name of the page that is being executed?

Many Thanks,
Angel

"Patrice Scribe" <nobody@nowhere.com> wrote in message news:<eT5Rbo5#DHA.2292@TK2MSFTNGP12.phx.gbl>...
> Try rather the Script_Name server variables.
>
> The Url is rather the exact url requested (which doesn't change wehn using
> Server.Transfer) while Script_Name should be always IMO the current file...
>
> --
>
> "Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
> news:cd080612.0402250351.1aa3534d@posting.google.c om...
> > Hello,
> >
> > I need to know on evry request the page name, my problem is when use
> > the method server.transfer, i always get the name of the calling page.
> >
> > I use context.Current.Request.Url, but I am always getting the first
> > page.
> >
> > Is there a way to get the name of the transfered page?
> >
> > Thanks,
> > Manuel


Patrice Scribe 02-27-2004 09:16 AM

Re: Know Page Name with ServerTransfer
 
Should have thought about that as it's taken from the original HTTP request
I suppose. The only option I can see is to query for the current class using
reflection or something similar.

I would recommend not using Server.Transfer for navigation purpose but
rather only when, for some reason, you have a processing only page that
logically "belongs" to the calling navigation page.

Patrice


--

"Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
news:cd080612.0402260206.7d7328e8@posting.google.c om...
> Hello Patrice thanks for your reply,
>
> I have tried using Request.ServerVariables("Script_Name") and I get
> the same behavior when using server.transfer I always get the calling
> page.
>
> There must be a way to the name of the page that is being executed?
>
> Many Thanks,
> Angel
>
> "Patrice Scribe" <nobody@nowhere.com> wrote in message

news:<eT5Rbo5#DHA.2292@TK2MSFTNGP12.phx.gbl>...
> > Try rather the Script_Name server variables.
> >
> > The Url is rather the exact url requested (which doesn't change wehn

using
> > Server.Transfer) while Script_Name should be always IMO the current

file...
> >
> > --
> >
> > "Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
> > news:cd080612.0402250351.1aa3534d@posting.google.c om...
> > > Hello,
> > >
> > > I need to know on evry request the page name, my problem is when use
> > > the method server.transfer, i always get the name of the calling page.
> > >
> > > I use context.Current.Request.Url, but I am always getting the first
> > > page.
> > >
> > > Is there a way to get the name of the transfered page?
> > >
> > > Thanks,
> > > Manuel



Patrice Scribe 03-01-2004 08:55 AM

Re: Know Page Name with ServerTransfer
 
Request.CurrentExecutionFilePath does the job...

Patrice

--

"Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
news:cd080612.0402260206.7d7328e8@posting.google.c om...
> Hello Patrice thanks for your reply,
>
> I have tried using Request.ServerVariables("Script_Name") and I get
> the same behavior when using server.transfer I always get the calling
> page.
>
> There must be a way to the name of the page that is being executed?
>
> Many Thanks,
> Angel
>
> "Patrice Scribe" <nobody@nowhere.com> wrote in message

news:<eT5Rbo5#DHA.2292@TK2MSFTNGP12.phx.gbl>...
> > Try rather the Script_Name server variables.
> >
> > The Url is rather the exact url requested (which doesn't change wehn

using
> > Server.Transfer) while Script_Name should be always IMO the current

file...
> >
> > --
> >
> > "Manuel Lopez" <mcpollo@terra.es> a écrit dans le message de
> > news:cd080612.0402250351.1aa3534d@posting.google.c om...
> > > Hello,
> > >
> > > I need to know on evry request the page name, my problem is when use
> > > the method server.transfer, i always get the name of the calling page.
> > >
> > > I use context.Current.Request.Url, but I am always getting the first
> > > page.
> > >
> > > Is there a way to get the name of the transfered page?
> > >
> > > Thanks,
> > > Manuel




All times are GMT. The time now is 10:02 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.