Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Know Page Name with ServerTransfer

Reply
Thread Tools

Know Page Name with ServerTransfer

 
 
Manuel Lopez
Guest
Posts: n/a
 
      02-25-2004
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
 
Reply With Quote
 
 
 
 
Patrice Scribe
Guest
Posts: n/a
 
      02-25-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) 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


 
Reply With Quote
 
 
 
 
Manuel Lopez
Guest
Posts: n/a
 
      02-26-2004
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" <(E-Mail Removed)> wrote in message news:<eT5Rbo5#(E-Mail Removed)>...
> 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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed) 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

 
Reply With Quote
 
Patrice Scribe
Guest
Posts: n/a
 
      02-27-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) 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" <(E-Mail Removed)> wrote in message

news:<eT5Rbo5#(E-Mail Removed)>...
> > 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" <(E-Mail Removed)> a écrit dans le message de
> > news:(E-Mail Removed) 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


 
Reply With Quote
 
Patrice Scribe
Guest
Posts: n/a
 
      03-01-2004
Request.CurrentExecutionFilePath does the job...

Patrice

--

"Manuel Lopez" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) 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" <(E-Mail Removed)> wrote in message

news:<eT5Rbo5#(E-Mail Removed)>...
> > 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" <(E-Mail Removed)> a écrit dans le message de
> > news:(E-Mail Removed) 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a variable name to a hash to name is part of the variable name Bobby Chamness Perl 2 04-22-2007 09:54 PM
print("my name is {name}, and {age}-year old {gender}", name, age, gender); =?iso-8859-1?B?bW9vcJk=?= Java 7 01-02-2006 04:39 PM
I know, I know, I don't know Andries Perl Misc 3 04-23-2004 02:17 AM
name = name.substring(0, name.lastIndexOf('.')); Help please Jack-2 Javascript 3 12-24-2003 04:39 PM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments