Putting Current URL in a Session Variable
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Putting Current URL in a Session Variable




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Putting Current URL in a Session Variable  
Keith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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.







[ Post a follow-up to this message ]



    Re: Putting Current URL in a Session Variable  
Keith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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.
>
>







[ Post a follow-up to this message ]



    Re: Putting Current URL in a Session Variable  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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)






[ Post a follow-up to this message ]



    Re: Putting Current URL in a Session Variable  
Keith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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?







[ Post a follow-up to this message ]



    Re: Putting Current URL in a Session Variable  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:42 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register