473,729 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the full URL

I need to get the full URL of the current page in ASP. When using
Request.ServerV ariables("URL") anything after the filename (such as a
#section1 to jump to an area on the page or data submitted from a form using
the GET method) is automatically removed. I do not know of any keys for the
Request.ServerV ariables collection that do this, but cannot find any other
objects/properties that would be appropriate. Any help would be appreciated.
Thank You.
--
Nathan Sokalski
nj********@hotm ail.com
www.nathansokalski.com
Jul 19 '05 #1
5 10828
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.publi c.inetserver.as p.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerV ariables("URL") anything after the filename (such as a
#section1 to jump to an area on the page or data submitted from a form
using
the GET method) is automatically removed. I do not know of any keys
for the Request.ServerV ariables collection that do this, but cannot
find any other objects/properties that would be appropriate. Any help
would be appreciated. Thank You.


response.write Request.ServerV ariables("URL") & "?" & Request.queryst ring

Please stop this gross crossposting.

Foollow up only to: microsoft.publi c.inetserver.as p.general

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
>I need to get the full URL of the current page in ASP.

Then why are you posting to asp.net, webcontrols, webservices, and
components newsgroups?

Follow-ups set ONLY to asp.general.

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #3
That would work for data posted via a form using the GET method, but what
about URLs that jump to a specific part of the page (using something like
filename.asp#ti tleindex)?
--
Nathan Sokalski
nj********@hotm ail.com
www.nathansokalski.com
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.publi c.inetserver.as p.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerV ariables("URL") anything after the filename (such as a
#section1 to jump to an area on the page or data submitted from a form
using
the GET method) is automatically removed. I do not know of any keys
for the Request.ServerV ariables collection that do this, but cannot
find any other objects/properties that would be appropriate. Any help
would be appreciated. Thank You.


response.write Request.ServerV ariables("URL") & "?" & Request.queryst ring

Please stop this gross crossposting.

Foollow up only to: microsoft.publi c.inetserver.as p.general

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #4
I think you are pretty much out of luck there. The browser doesn't appear to
send the page hash.

Here is what I get for a trace when I enter
http://localhost/wbtmanager/listsesvars.asp#help

GET /wbtmanager/listsesvars.asp HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost
Connection: Keep-Alive
Cookie: ASPSESSIONIDAQD TTRCT=FALPMHFAL OJJNKDGPKIEHFPO ;
ASPSESSIONIDCSC STQCS=NPLFPHFAO PELEGGFCEIKDJHE
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
That would work for data posted via a form using the GET method, but what
about URLs that jump to a specific part of the page (using something like
filename.asp#ti tleindex)?
--
Nathan Sokalski
nj********@hotm ail.com
www.nathansokalski.com
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.publi c.inetserver.as p.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerV ariables("URL") anything after the filename (such as a
#section1 to jump to an area on the page or data submitted from a form
using
the GET method) is automatically removed. I do not know of any keys
for the Request.ServerV ariables collection that do this, but cannot
find any other objects/properties that would be appropriate. Any help
would be appreciated. Thank You.


response.write Request.ServerV ariables("URL") & "?" & Request.queryst ring
Please stop this gross crossposting.

Foollow up only to: microsoft.publi c.inetserver.as p.general

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Jul 19 '05 #5
Right, this is all handled on the client side; the browser scans the HTML
and finds the <a name> bookmark, and scrolls to that location. ASP is never
involved in this process at all. In fact, in some scenarios, ASP can cause
the browser to bypass the process altogether.

http://www.aspfaq.com/2070

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mark Schupp" <ms*****@ielear ning.com> wrote in message
news:e$******** ******@TK2MSFTN GP09.phx.gbl...
I think you are pretty much out of luck there. The browser doesn't appear
to
send the page hash.

Here is what I get for a trace when I enter
http://localhost/wbtmanager/listsesvars.asp#help

GET /wbtmanager/listsesvars.asp HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost
Connection: Keep-Alive
Cookie: ASPSESSIONIDAQD TTRCT=FALPMHFAL OJJNKDGPKIEHFPO ;
ASPSESSIONIDCSC STQCS=NPLFPHFAO PELEGGFCEIKDJHE
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
That would work for data posted via a form using the GET method, but what
about URLs that jump to a specific part of the page (using something like
filename.asp#ti tleindex)?
--
Nathan Sokalski
nj********@hotm ail.com
www.nathansokalski.com
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
> Nathan Sokalski wrote on 28 jun 2004 in
> microsoft.publi c.inetserver.as p.general:
> > I need to get the full URL of the current page in ASP. When using
> > Request.ServerV ariables("URL") anything after the filename (such as a
> >#section1 to jump to an area on the page or data submitted from a form
> >using
> > the GET method) is automatically removed. I do not know of any keys
> > for the Request.ServerV ariables collection that do this, but cannot
> > find any other objects/properties that would be appropriate. Any help
> > would be appreciated. Thank You.
>
> response.write Request.ServerV ariables("URL") & "?" & Request.queryst ring >
> Please stop this gross crossposting.
>
> Foollow up only to: microsoft.publi c.inetserver.as p.general
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)



Jul 19 '05 #6

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

Similar topics

1
1765
by: Elie B. | last post by:
Hi, I'm new to Python. I'm trying to embbed Python in my Windows application having some success with redirecting the stdin/out to my windows application using: In my C++ code I use PyRun_SimpleString to execute this code: import sys import mymodule class LOGwriter :
1
1235
by: sumGirl | last post by:
Hi all. If we have a long running process for a database and the log is threatening to hit 100%, whats the best way to resolve it?
4
1985
by: ItsMe | last post by:
Dear All, I'm getting junk email with around 140-150 kb almost everyday and it my mailbox is getting full and this emails are full of virus effected attachments. And I'm getting these emails right after subscribing Microsoft Newsgroups, don't tell me that Microsoft Newsgroups can't control these things. I hope others are also facing these problem.
0
1127
by: Patrick Olurotimi Ige | last post by:
I get username by calling "User.identity.name" when using Window Authentication for example DOMAIN/JBond. But how can i get my FULLNAME? Is there something similar to User.Identity.name apart from using LOGON_USER to get my fullname? In old ASP i call "fullname" using (GetObject)and i get for example James Bond.
2
2043
by: bil.shah | last post by:
Hi, I am listening to a port for data but I am not able to recieve whole data, I only get truncated data. Client sends me data that exceeds 40K and the data I recieve in my callback function is always 8K to 9K. I dont get the rest of the data. I think the data size is too big to come in one go and hence it comes in 2-3 sub-packages but my call back function only gets called once hence I am getting truncated data. I am sending the...
4
1555
by: BLIZZARDICE | last post by:
I will discribe my problem here but the second paragraph will discribe my setup. I have been working on a project in house and we thouhgt we were ready to move it outside for the client. However now that it is outside I get a permission denied error on line 1 char 1. I am using a simple javascript: parent.scriptname("argument") call. I have been swithing all kinds of permisiions with no changes. Any ideas? I am designing a website that...
1
2603
by: fattymelt | last post by:
I'm running Resin as an app server, behind Apache as a web server. Apache proxies requests to resin. Such that using getRequestURL() gives http://localhost:8081/app) as opposed to the actual URL seen in the browser (http://www.example.com/app). How would I go about retrieving the "pre-proxy" URL? I can successfully get the host by using getHeader("X-Forwarded-Host") but this does not include the protocol (http/https) and I need that as...
0
1595
by: Johnny Jörgensen | last post by:
In an add-in I'm doing, I need to get the full filename of the file(s) selected by the Visual Studio 2005 user at a given time. Using: Dim win As Window = _applicationObject.ActiveWindow Dim uih As UIHierarchy = Nothing Dim uihItem As UIHierarchyItem = Nothing
2
4603
by: Scott | last post by:
I'm debugging an xmlrpc client/server application. Often when an exception occurs in the server, I receive only a very short error message on the client. For example: xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AssertionError'>:"> Presumably this is because xmlrpclib on the server is catching the exception, and only sending the exception name to the client, not the server's stack trace.
3
1862
dmjpro
by: dmjpro | last post by:
I am using this JavaScript code to open a window in a full screen mode .... var styles = "menubar=no,location=no,resizable=no,scrollbars=yes,status=no,left=0,top=0,width="+screen.width+",height="+screen.height; alert('Width: ' + screen.width + 'Height: ' + screen.height); var _win = window.open("welcome.jsp","opener_window",styles); Now it's working properly in IE but not working in Mozilla. In Mozilla, first of all it's having the...
0
8761
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9280
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 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...
1
9200
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,...
0
9142
tracyyun
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...
0
4525
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...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
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
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2162
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.