Hi,
From Page1.asp, I use "Server.transfe r" to "REDIRECT" to another asp page
(page2.asp),
in page2.asp I use Request.ServerV ariables("URL") and
Request.ServerV ariables("REFER ER") to get the lastpage and the actual page,
this method (or property) return incorrect values: "Page1.asp" and ""
Why?
Martin 4 2454
Server.Transfer is not a redirect and does not register a referral. The
ServerVariables collection is correct. Did the URL in your browser change
to page2.asp? No. Did you loop through *all* of the servervariables ?
"Martin" <ma******@freen et.de> wrote in message
news:%2******** ************@TK 2MSFTNGP10.phx. gbl... Hi, From Page1.asp, I use "Server.transfe r" to "REDIRECT" to another asp page (page2.asp), in page2.asp I use Request.ServerV ariables("URL") and Request.ServerV ariables("REFER ER") to get the lastpage and the actual page, this method (or property) return incorrect values: "Page1.asp" and ""
Why? Martin
Martin wrote: From Page1.asp, I use "Server.transfe r" to "REDIRECT" to another asp page (page2.asp), in page2.asp I use Request.ServerV ariables("URL") and Request.ServerV ariables("REFER ER") to get the lastpage and the actual page, this method (or property) return incorrect values: "Page1.asp" and ""
Why?
RTM:
Method: Server.Transfer
Description: Sends all of the current state information to another
.asp file for processing. http://msdn.microsoft.com/library/en...0507db91a5.asp
Server.Transfer Method
The Transfer method sends all of the information that has been
assembled for processing by one .asp file to a second .asp file. http://msdn.microsoft.com/library/en...38c2a61317.asp
That's why.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Simply put, Server.Transfer transfers execution to a different page on
the server. This is transparent to the URL that was requested by the
browser. Consquently, Request.ServerV ariables("URL") would reflect
whatever page was requested by the browser.
Try using Request.ServerV ariables("SCRIP T_NAME") or
Request.ServerV ariables("PATH_ INFO") to acheive the desired results.
I'm not positive that even these will work however, as the execution of
the page2 may still be viewed in the context of page1.
Thanks, I will try it
"Mike" <mb****@cramerd ev.com> schrieb im Newsbeitrag
news:11******** **************@ g47g2000cwa.goo glegroups.com.. . Simply put, Server.Transfer transfers execution to a different page on the server. This is transparent to the URL that was requested by the browser. Consquently, Request.ServerV ariables("URL") would reflect whatever page was requested by the browser.
Try using Request.ServerV ariables("SCRIP T_NAME") or Request.ServerV ariables("PATH_ INFO") to acheive the desired results. I'm not positive that even these will work however, as the execution of the page2 may still be viewed in the context of page1. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JW |
last post by:
I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer
page.
However, if the page that has Request.ServerVariables("HTTP_REFERER") is in
a popup window then the value is blank!!
Can anone assist as to how to solve this problem.
The requesting page is at http://www.theexperts.co.uk/error.htm
|
by: JW |
last post by:
Sorry, posting this twice as it tagged on to a spetember posting:
---------------------------------------------------------------
I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer
page.
However, if the page that has Request.ServerVariables("HTTP_REFERER") is in
a popup window then the value is blank!!
Can anone assist as to how to solve this problem.
|
by: JT |
last post by:
if i am using https, will this work the same as if i were
using http?
Request.ServerVariables("HTTP_HOST")
returns www.mywebsite.net for http.
what about https?????
|
by: Elliot M. Rodriguez |
last post by:
..NET Framework 1.1
Has anyone reported or experienced NullReferenceException errors when
accessing the HTTP_REFERER value on clients that are behind web blocking
software?
At least one of our customers uses the WatchDog WebBlocker product. Our web
app would throw NullReferenceException errors on the following line
(assigning a Hyperlink control's NavigateURL property to the HTTP_REFERER
value):
|
by: Lloyd Dupont |
last post by:
I can't use Control.ResolveUrl because I need to write the conversion in a
utility class.
However I know the current context.
How could I convert the URL to one usable by the user?
--
I have taken a vow of poverty. If you want to really piss me off, send me
money.
| |
by: Patrick |
last post by:
Greetings,
I'm running into an intermittant issue on a web site running dotNet 1.1
sp1.
The global.asax the client is using is set up so that it can be used in
production, developement, and testing without modfication using
Request.ServerVariables("SERVER_NAME") and a select case statement to
get the correct sql connection information.
The problem in production is that the return from
|
by: Christian Blackburn |
last post by:
Hi Gang,
I'm using the following code to generate a complete URL:
Session("Destination") = Request.ServerVariables("Path_Info") & "?" &
Request.ServerVariables("QUERY_STRING")
However that seems like a lot of work. Is there one command coming off
the request object that'll acomplish this?
Thanks,
|
by: E L |
last post by:
We have the Request.ServerVariables("SERVER_NAME") used in a classic ASP
page using IIS 6.
It used to return our website name: www.xxx.name.this when using IIS 5,
now it is returning the IP address when we type the full www. url.
How can I fix this behavior?
*** Sent via Developersdex http://www.developersdex.com ***
|
by: Henry Stock |
last post by:
I don't seem to understand how to use the value:
Request.ServerVariables("remote_addr")
I am trying to pass the ip address of a sending web client in the body of an
email message.
When I compile the following code I get the this error message:
Error 1 'System.Web.HttpRequest.ServerVariables' is a 'property' but is used
like a 'method' D:\Projects\sample\comments.aspx.cs 38 78
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |