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

Obtaining page path when using Server.Transfer...

P: n/a
Grettings,
Normally I can use Request.RawUrl to get the 'current' page (amongst many
other things). But in the case of using a Server.Transfer
[as in Server.Transfer(bar.aspx) from foo.aspx, my RawUrl is still showing
foo.aspx (understandably) because a 'request' is not being made per say.
But my problem is that I have a 'basepage' that needs to know the current
page, even if the page is being loaded via a server.transfer... any ideas?
Note: It's not just the page name [bar.aspx] but the path from the root of
the site [or virtual dir.]. So if foo.aspx server.transfer()ed to
http://www.domain.com/somefolder/bar.aspx I need '/somefolder/bar.aspx'.
Thanks in advance.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Have you considered using a Response.Redirect() rather than a
Server.Transfer()? I don't know if that would work with your current
architecture, but it would solve the page name problem.

Chris
--------------------
From: "Terry Mulvany" <te****@mcelroyla.com>
Subject: Obtaining page path when using Server.Transfer...
Date: Fri, 30 Apr 2004 11:35:52 -0700
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#w**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: user-119bsue.biz.mindspring.com 66.149.243.206
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10
.phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:230326
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Grettings,
Normally I can use Request.RawUrl to get the 'current' page (amongst many
other things). But in the case of using a Server.Transfer
[as in Server.Transfer(bar.aspx) from foo.aspx, my RawUrl is still showing
foo.aspx (understandably) because a 'request' is not being made per say.
But my problem is that I have a 'basepage' that needs to know the current
page, even if the page is being loaded via a server.transfer... any ideas?
Note: It's not just the page name [bar.aspx] but the path from the root of
the site [or virtual dir.]. So if foo.aspx server.transfer()ed to
http://www.domain.com/somefolder/bar.aspx I need '/somefolder/bar.aspx'.
Thanks in advance.


Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.