473,499 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get current page after transfer

I'm trying to add logging to my web application, but I found a strange problem. Whenever I execute a Server.Redirect(Page1.asp) I can use the request.ServerVariables("SCRIPT_NAME") to get the current page name. However, if I use Server.Transfer(Page1.asp), the value of the server variable equals the refering page (In this case default.asp). How do I get the value of the working page regardless of the transfer method

Jul 19 '05 #1
2 1481
I think you'd have to use response.redirect (not server.redirect). The
behavior you describe is expected by design, I'd say. default.asp is still
the page that is doing the work, kinda like if you had a default.asp that
INCLUDED page1.asp, you wouldn't expect there to be any reference in server
variables to that, would you?

Ray at work

"wildfire0ne" <an*******@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
I'm trying to add logging to my web application, but I found a strange problem. Whenever I execute a Server.Redirect(Page1.asp) I can use the
request.ServerVariables("SCRIPT_NAME") to get the current page name.
However, if I use Server.Transfer(Page1.asp), the value of the server
variable equals the refering page (In this case default.asp). How do I get
the value of the working page regardless of the transfer method.

Jul 19 '05 #2
Thanks for the assist. I'll have to add the page to the log manually then. Oh well.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3416
by: Andreas Klemt | last post by:
Hello, is there a solution to use server.transfer like this: Server.Transfer("javascript:void window.open('webform2.aspx','testwindow','menubar=1,scrollbars=1,width=600,h eight=400')") I get...
1
1712
by: Mike Hofer | last post by:
I really need some help, and I'd appreciate any that you folks can provide. The ASP.NET application in question uses version 1.1 of the .NET Framework. All of the pages use a common base class...
11
26378
pbmods
by: pbmods | last post by:
A somewhat obscure hack has emerged recently that is an offshoot of the now-infamous XSS. It is known as Cross-Site Request Forgery, or XSRF for short. XSRF is a form of temporary identity theft...
2
3086
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7220
jinu1996
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...
0
5468
agi2029
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,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
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...
0
3098
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...
0
1427
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 ...
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.