Forum Moderators: open

Message Too Old, No Replies

Apending dynamic querystring to every link

         

tomharrow

10:45 am on Mar 31, 2005 (gmt 0)



I need to dynamically append a session variable to a querystring to every link on our site. Is this possible in ASP?

in application onstart in the global.asa i am storing links in application variables. i want to be able to add a querystring value s=<%=session("S")%>. But ASP does not allow you to add session values in the application onStart routine.

I want to know if i can add this value to everylink in the site in one swoop maybe using a dll or something? Have you heard of a script or a tool that can sweep a site and add a querystring value to every link?

Any help much appreciated.

aspdaddy

8:33 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



application on_start only fires when the server reboots, so its the wrong context for session variables.

Sounds like you need to reference the application variables from session on_start() event and build your links there for each session:

session on_start()
session("uri") = application("url") & session("querystring")