How to set Cookies value
S T E P - 1
- We can use the Response object to create cookies into the visitor's computer:
<% Response.Cookies("MemberID") = strMemID %>
S T E P - 2
- We can set a cookies with multiple values:
<%
Response.Cookies("Member")("ID") = strMemberID
Response.Cookies("Member")("Email") = strMemberID
%>
S T E P - 3
- We can set the Expires properties to determine how long time the computer will need to keep the cookies:
<%
Response.Cookies("Member")("ID") = strMemberID
Response.Cookies("Member")("Email") = strMemberID
Response.Cookies("Member").Expires = DateAdd("h", 5, Now()) 'After 5 hours the Cookies will be delete.
%>
No comments:
Post a Comment