By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,811 Members | 785 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,811 IT Pros & Developers. It's quick & easy.

Know Page Name with ServerTransfer

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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


Nov 18 '05 #2

P: n/a
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" <no****@nowhere.com> wrote in message news:<eT**************@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" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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

Nov 18 '05 #3

P: n/a
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" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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" <no****@nowhere.com> wrote in message

news:<eT**************@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" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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


Nov 18 '05 #4

P: n/a
Request.CurrentExecutionFilePath does the job...

Patrice

--

"Manuel Lopez" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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" <no****@nowhere.com> wrote in message

news:<eT**************@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" <mc*****@terra.es> a écrit dans le message de
news:cd**************************@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


Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.