Official Content

Returns the value with which the variable is loaded in the POST in a String.

Syntax

&VarBasedOnHttpRequest.GetVariable (Character-expression)

Where:
Character-expression
     Is an expression that refers to the variable name that contains the value to be obtained.

Type Returned:
Character

Scope

Extended Data Types: HttpRequest
Generators: .NET, Java, Ruby (up to GeneXus X Evolution 3)


Samples

Sample #1: Getting a control value from a GeneXus generated web page.
&value = &httprequest.GetVariable(CustomerId.InternalName)  //The value of the screen attribute CustomerId is stored in the &value variable.
&value = &httprequest.GetVariable(&Email.InternalName)      //The value of the screen variable &Email is stored in the &value variable.


Sample #2: Getting a control value from a screen control with name= "txtEmail".

&value = &httprequest.GetVariable("txtEmail")   //The value of the screen control with name “txtEmail” is stored in the &value variable.


See Also

HttpRequest Data Type




Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant