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.
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.