> ' Add a cookie > ' expC1 Cookie > ' expC2 Value > ' expC3 Path > ' expC4 Expiration > Public Function AddCookie(ByVal tcCookie As String, ByVal tcValue As String, _ > ByVal tcPath As String, ByVal tdExpiration As Date) As Boolean > Dim lcPath As String = tcPath > Dim lcValue As String = tcValue > Dim loCookie As New System.Web.HttpCookie(tcCookie) > > ' If empty we take the default path > If lcPath.Length = 0 Then > lcPath = "/" > End If > > ' This will determine if there is a need to encrypt the cookie > ' Everything is based on oApp.lEncryption > lcValue = oApp.EncryptUrl(lcValue, False) > > loCookie.Value = lcValue > > ' If the expiration date is empty, we should not pass it in order for the cookie to expire > ' when the browser session ends > If Not oApp.EmptyDate(tdExpiration) Then > loCookie.Expires = tdExpiration > End If > > loCookie.Path = tcPath > oApp.oCookie.Add(loCookie) > End Function >>