Set cookie by typing url

Reply

Join Date: Dec 2007
Posts: 9
Reputation: mrt.work is an unknown quantity at this point 
Solved Threads: 0
mrt.work mrt.work is offline Offline
Newbie Poster

Set cookie by typing url

 
0
  #1
Jan 4th, 2008
Hi i would like to know how can we set the cookie by just typing url for example, www.test.com/default.asp?field1=mark&name=john so when the user type in the url above, the two cookies will be set, which is field and name with the value mark and john. any replies, i'd appreciate. thanks
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 35
Reputation: mellamokb is an unknown quantity at this point 
Solved Threads: 5
mellamokb mellamokb is offline Offline
Light Poster

Re: Set cookie by typing url

 
0
  #2
Jan 4th, 2008
Loops through all of the QueryString variables and sets a cookie for each one.

  1. For Each strKey in Request.QueryString
  2. Response.Cookies(strKey) = Request.QueryString(strKey)
  3. Next

~ mellamokb
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC