Session Querystring

Joined
Jun 19, 2009
Messages
1
Reaction score
0
NOOb question -- Session QueryString

I have an ad unit on a site that links back to my site (ex. mysite.com?cid=adunit). I need to capture the cid querystring and store it as a session; so the user can surf around the site and when they register I can place the cid querystring in the form as a hidden value and I can then know how they got the my site.

I am not using any code behind and need the code to be on all .asp pages so I can link the ad units to any page. Since this code will be on all pages I need to make sure that session id doesnt get over written.

I currently have the following on landing pages but I am getting tired of creating landing pages of pages that I already have just to capture the cid (as a closed path): <%Session("RefID") = Request.QueryString("cid")%> then on the form page I have: <input type="hidden" name="adunit" value="<%=Session("RefID")%>">


Is there an easy way to check if cid is in the url and if its already stored as a session; if the session already has a value then it shouldnt be overwritten.

Much help is appreciated.
 

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,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top