spacer
spacerLokken Logo
spacerLokken Binary Logo
spacer
spacer
spacer
spacer spacer spacer spacer
Write Cookies and Values
Language:   Server Sided ASP - JavaScript
Author:   Jon Lokken
Date:   4-8-2005

Description: View Example
This is used to write cookies on the users machine from the server.

<%@ LANGUAGE="JavaScript" %>
<% Response.buffer=true %>

<%
Response.Cookies("UserCookie")("Username") = "Test User";
Response.Cookies("UserCookie")("Password") = "My Password";
Response.Cookies("UserCookie")("Favorite Color") = "Blue";

// Setup Values
var now = new Date();
Response.Write(nextYear);
Response.Cookies("UserCookie").Expires = "May 10,"+(now.getYear()+1);
Response.Cookies("UserCookie").Domain = ".lokken.net";
Response.Cookies("UserCookie").Path = "/";
%>


Disclaimer:
Feel free to use this code I have written.  I only ask that you leave my name in the comments.  I take no responsibility for this code working, imply no warranty as to it's validity, and will not be held liable if you decide to try it.  I am only trying to help out others so they don't have to struggle with the same problems as me...

Associated Sites: Jon Lokken - http://www.jonlokken.com | Samantha Lokken - http://www.samanthalokken.com | Amy Lokken - http://www.amylokken.com | Teresa Lokken - http://www.teresalokken.com | Gary Lokken - http://www.garylokken.com | Sharon Lokken - http://www.sharonlokken.com | Rockin Lokken - http://www.rockinlokken.com | Lokken Consulting - http://www.lokkenconsulting.com | Leistico - http://www.leistico.com | Greshwalk - http://www.greshwalk.com | Snowboarding Samantha - http://www.snowboardingsamantha.com | Snowboard 4 Fun - http://www.snowboard4fun.com | Snowboard for Fun - http://www.snowboardforfun.com | Snowboard Four Fun - http://www.snowboardfourfun.com
Author: Jon Lokken - http://www.lokken.net