Y
YT
Couple of quick ASP (3.0) Cookie questions:
1/ I'm using a cookie in my asp script to place cookies (within a key) so my code looks like:
Response.Cookies( "quoteform" )( "name" ) = Session( "name" )
Response.Cookies( "quoteform" )( "organization" ) = Session( "organization" )
Response.Cookies( "quoteform" )( "address1" ) = Session( "address" )
Response.Cookies( "quoteform" )( "address2" ) = Session( "suite" )
Response.Cookies( "quoteform" )( "city" ) = Session( "city" )
Response.Cookies( "quoteform" )( "provstate" ) = Session( "provstate" )
Response.Cookies( "quoteform" )( "postzip" ) = Session( "postzip" )
Response.Cookies( "quoteform" )( "email" ) = Session( "email" )
Response.Cookies( "quoteform" )( "phone" ) = Session( "phone" )
Response.Cookies( "quoteform" )( "fax" ) = Session( "fax" )
Can i set the expires property to this entire key? Like so:
Response.Cookies( "quoteform" ).Expires = DateAdd( "m", 1, Now )
Or do i have to set the expires property for each cookie above?
2/ Is there a really quick way of removing all of the above cookies? or do i have to do something like:
Response.Cookies( "quoteform" )( "name" ) = ""
Response.Cookies( "quoteform" )("name").Expires = DateAdd( "d", -1, Now )
Thanks!
yt
1/ I'm using a cookie in my asp script to place cookies (within a key) so my code looks like:
Response.Cookies( "quoteform" )( "name" ) = Session( "name" )
Response.Cookies( "quoteform" )( "organization" ) = Session( "organization" )
Response.Cookies( "quoteform" )( "address1" ) = Session( "address" )
Response.Cookies( "quoteform" )( "address2" ) = Session( "suite" )
Response.Cookies( "quoteform" )( "city" ) = Session( "city" )
Response.Cookies( "quoteform" )( "provstate" ) = Session( "provstate" )
Response.Cookies( "quoteform" )( "postzip" ) = Session( "postzip" )
Response.Cookies( "quoteform" )( "email" ) = Session( "email" )
Response.Cookies( "quoteform" )( "phone" ) = Session( "phone" )
Response.Cookies( "quoteform" )( "fax" ) = Session( "fax" )
Can i set the expires property to this entire key? Like so:
Response.Cookies( "quoteform" ).Expires = DateAdd( "m", 1, Now )
Or do i have to set the expires property for each cookie above?
2/ Is there a really quick way of removing all of the above cookies? or do i have to do something like:
Response.Cookies( "quoteform" )( "name" ) = ""
Response.Cookies( "quoteform" )("name").Expires = DateAdd( "d", -1, Now )
Thanks!
yt