The WriteCookie function stores a value under a name in the browser.
Syntax | |||||
WriteCookie(ByVal Name As String, ByVal Value As String, ExpiresSecondsFromNow as Double) | |||||
Return value | |||||
Type |
Description | ||||
Long |
0 if carried out error-free | ||||
Parameter | |||||
Use |
Name |
Type |
Passing |
Description | |
Required |
Name |
String |
ByVal |
The name of the cookie entry | |
Required |
Value |
String |
ByVal |
The value to store under the name | |
Required |
ExpiresSecondsFromNow |
Double |
ByVal |
Cookie expiration time in seconds | |
Example:
Cookie entries are written with an expiry time of one year (31536000 seconds = 365*24*60*60))
Client.WebClient.WriteCookie("username", Name, 31536000)
Client.WebClient.WriteCookie("company", Company, 31536000)