Putting Current URL in a Session Variable

K

Keith

Is there any way of setting the URL of the current page in a session
variable?

I want to do this so I can create links and redirects back to the page on
which the user invokes a particular procedure.
 
K

Keith

If it makes a difference, the site is in frames. The URL I want to capture
is that of the page loaded in the Main frame.
 
E

Evertjan.

Keith wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
in message
If it makes a difference, the site is in frames. The URL I want to
capture is that of the page loaded in the Main frame.

[Please do not toppost, even answering your own posts]

<%
mySite = "http://www.mySite.com"
session("myUrl") = mySite & "/myfolder/mypage.asp"
%>

or more general [but why would you?]

<%
mySite = "http://www.mySite.com"
session("myUrl") = mySite & Request.servervariables("URL")
%>

ASP does not know about frames !
 
K

Keith

Evertjan. said:
Keith wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
in message
If it makes a difference, the site is in frames. The URL I want to
capture is that of the page loaded in the Main frame.

[Please do not toppost, even answering your own posts]

<%
mySite = "http://www.mySite.com"
session("myUrl") = mySite & "/myfolder/mypage.asp"
%>

or more general [but why would you?]

<%
mySite = "http://www.mySite.com"
session("myUrl") = mySite & Request.servervariables("URL")
%>

ASP does not know about frames !

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

The second method is great (using request.servervariables("url").

However, is there a way of also capturing any parameters that were passed to
the page when it was opened?
 
E

Evertjan.

Keith wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
The second method is great (using request.servervariables("url").

However, is there a way of also capturing any parameters that were
passed to the page when it was opened?

Sure.

wholeQuerystring = request.querystring

You can read the request.form collection with a for..each loop.

=======

btw:
I think you will have to study ASP tutorials and [sample] page files.
They are all over the web.
To ask every single method of ASP programming will not get you far.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top