HasCookie Method
Syntax
Context.Request.HasCookie as L (CookieName as C)
Arguments
- CookieNameCharacter
The name of the cookie to look for.
Returns
- ResultLogical
Returns .t. if the cookie exists, otherwise .f.
Description
Tests if a cookie exists.
Discussion
The Context.Request.HasCookie method checks to see if CookieName exists. If the cookie exists, HasCookie returns .t., otherwise it returns .f..
Use the Context.Request.GetCookie Method to get the cookie.
Example
dim cookieName as c cookieName = "CustomCookie" if Context.Request.HasCookie(cookieName) then ?"The cookie exists." + crlf() ?Context.Request.GetCookie(cookieName) else ?"The cookie doesn't exist." + crlf() end if
See Also