prichardson Posted May 10, 2007 Share Posted May 10, 2007 I am trying to use asp cookies. I have a landing page called uk/index.asp and has 2 links one goes to uk/home.asp and the other one goes to us/index.I want to use cookies so that when a UK or US user arrives and selects their country link so they go to the appropriate web pages (uk or us). However when they come back (return on another visit to the website) to the landing page the cookie will kick-in and redirect to their country pages that they selected the first time.This is the code i have so far, please tell me how to correct it so i can get it to work:the landing page (uk/index.asp) <%Response.buffer=true%><doc ....><head></head><body><%Dim CountryIf Country = Request.Cookies("UK") Then Response.Redirect strURLPath & "home.asp"If Country = Request.Cookies("US") Then Response.Redirect strURLPath & "us/index.asp"If Countryt = "" Then%>'A table with the two links<%End If%></body> the other pages:uk/home.asp #(UK version) <%Dim UKResponse.Cookies("Country")=UKResponse.Cookies("Country").Expire=Date +365%> us/index.asp #(US version) <%Dim UKResponse.Cookies("Country")=USResponse.Cookies("Country").Expire=Date +365%> Link to comment Share on other sites More sharing options...
justsomeguy Posted May 11, 2007 Share Posted May 11, 2007 If Countryt = "" ThenYou can probably just remove the extra t there. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.