IIS ASP - Putting Current URL in a Session Variable

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > August 2004 > Putting Current URL in a Session Variable





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Putting Current URL in a Session Variable
Keith

2004-08-27, 6:16 pm

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.


Keith

2004-08-27, 6:16 pm

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.

"Keith" <@.> wrote in message news:Osn3Lz0iEHA.1140@tk2msftngp13.phx.gbl...
> 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.
>
>



Evertjan.

2004-08-27, 6:16 pm

Keith wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
> "Keith" wrote 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)

Keith

2004-08-27, 6:16 pm


"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns955174E2DD065eejj99@194.109.133.29...
> Keith wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
>
> [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?


Evertjan.

2004-08-27, 6:17 pm

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.

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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com