Cookies and Class

Results 1 to 3 of 3

Thread: Cookies and Class

  1. #1
    Join Date
    Dec 1969

    Default Cookies and Class

    I&#039;ve have written a little simple class in ASP to manage a cookie. <BR><BR>2 Function were implemented <BR>GetCookie(Cookiename) <BR>gFirstName = Request.Cookies (Cookiename)("FIRSTNAME") <BR><BR>PutCookie(Cookiename) <BR>Response.Cookies (Cookiename)("FIRSTNAME") = FirstName <BR>Response.Cookies (Cookiename).Expires = Now + 365 <BR><BR>They don&#039;t work! <BR>I&#039;m sure there aren&#039;t syntax errors. <BR><BR>Is it possible to use cookies collection inside a class? <BR><BR>Thanks

  2. #2
    Mike Shaffer Guest

    Default Please don't cross-post your questions

    &nbsp;<BR>The answer is &#039;yes&#039;.

  3. #3
    Join Date
    Dec 1969

    Default RE: Please don't cross-post your questions

    Do you think these functions are ok?<BR><BR>Public Function GetCookie(Cookiename)<BR> gFirstName = Request.Cookies (Cookiename)("FIRSTNAME") <BR>End Function<BR><BR>Public Function PutCookie(Cookiename)<BR> Response.Cookies (Cookiename)("FIRSTNAME") = FirstName <BR> Response.Cookies (Cookiename).Expires = Now + 365<BR>End Function<BR><BR>I&#039;m not able to solve the problem<BR>Do you have any suggestions?<BR><BR>Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts