Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies and Frames and ASP pages

Status
Not open for further replies.

LesterEmo

ISP
Dec 24, 2001
1
US
Is there a way I can pass cookie info generated on a home page into the body pages of a site that is made up of 2 pages in frames????

I need to be able to pass the info into BOTh pages.
Seems like I can't because of the way framesets and framesrc behaves . . . .

I haven't been able to pass a cookie effectively.
Possible????
or not . . . .


 
hi, i can suggest using a global.asa file, generate the cookies, and then save the results to the global asa file,

ie

********************************************************
GLOBAL.ASA (example of Global.asa file)

sub Session_OnStart
session("cookiename")= "test"
End sub
sub Session_OnEnd
session("cookiename")= "test"
End sub

********************************************************
HOMEPAGE (example of coding on homepage, to set variables from cookies)

<% dim cookiename
cookiename = request.cookies(&quot;name&quot;)
set session(&quot;cookiename&quot;) = cookiename
%>

********************************************************
RETRIEVING PAGES (example of coding for each page to show the cookie variable required)

<%
<% =Session(&quot;cookiename&quot;) %>

********************************************************

please note that Session(&quot;cookiename&quot;) is just an example, and the section in &quot;&quot; can be changed for each variable name.

The above is just an example. and i will note say wether it will work exactly as is, i am only a learner at this myself, but the above gives the general idea of how it needs to be set up.

this will then allow you to use all the variables on each page

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top