GetCookie function

Official Content
This documentation is valid for:

Returns a string with the cookie’s value.

Syntax

GetCookie(character-expression)

Where:
character-expression
    Is the cookie’s name.

Type Returned:
Character

Scope

Objects: Procedure, Transaction Web Panel
Generators:  .NET, Java, Ruby (up to GeneXus X Evolution 3)

Description

It makes it possible to read a cookie and return a string with its value. If it doesn’t find the cookie (or can’t read it because it is disabled), it returns an empty string.

Samples

&UserIdChar = GetCookie(UserParameters.CookieName) // Or...
&UserIdChar = trim(GetCookie(UserParameters.CookieName))

See Also

SetCookie function