473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Getting the full URL

I need to get the full URL of the current page in ASP. When using
Request.ServerVariables("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.ServerVariables 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********@hotmail.com
www.nathansokalski.com
Jul 19 '05 #1
5 10801
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.public.inetserver.asp.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerVariables("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.ServerVariables 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.ServerVariables("URL") & "?" & Request.querystring

Please stop this gross crossposting.

Foollow up only to: microsoft.public.inetserver.asp.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#titleindex)?
--
Nathan Sokalski
nj********@hotmail.com
www.nathansokalski.com
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.public.inetserver.asp.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerVariables("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.ServerVariables 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.ServerVariables("URL") & "?" & Request.querystring

Please stop this gross crossposting.

Foollow up only to: microsoft.public.inetserver.asp.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: ASPSESSIONIDAQDTTRCT=FALPMHFALOJJNKDGPKIEHFPO;
ASPSESSIONIDCSCSTQCS=NPLFPHFAOPELEGGFCEIKDJHE
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.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#titleindex)?
--
Nathan Sokalski
nj********@hotmail.com
www.nathansokalski.com
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Nathan Sokalski wrote on 28 jun 2004 in
microsoft.public.inetserver.asp.general:
I need to get the full URL of the current page in ASP. When using
Request.ServerVariables("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.ServerVariables 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.ServerVariables("URL") & "?" & Request.querystring
Please stop this gross crossposting.

Foollow up only to: microsoft.public.inetserver.asp.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*****@ielearning.com> wrote in message
news:e$**************@TK2MSFTNGP09.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: ASPSESSIONIDAQDTTRCT=FALPMHFALOJJNKDGPKIEHFPO;
ASPSESSIONIDCSCSTQCS=NPLFPHFAOPELEGGFCEIKDJHE
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.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#titleindex)?
--
Nathan Sokalski
nj********@hotmail.com
www.nathansokalski.com
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
> Nathan Sokalski wrote on 28 jun 2004 in
> microsoft.public.inetserver.asp.general:
> > I need to get the full URL of the current page in ASP. When using
> > Request.ServerVariables("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.ServerVariables 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.ServerVariables("URL") & "?" & Request.querystring >
> Please stop this gross crossposting.
>
> Foollow up only to: microsoft.public.inetserver.asp.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
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...
1
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
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...
0
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...
2
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...
4
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...
1
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...
0
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 ...
2
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:...
3
dmjpro
by: dmjpro | last post by:
I am using this JavaScript code to open a window in a full screen mode .... var styles =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.