Skip to content

UrlParameter - cWebApp

Gets the value of a URL parameter that was passed with the web application URL when the web application was loaded

Type: Function
Return Data Type: String

Parameters

Parameter Type Description
sName String Parameter name

Syntax

Function UrlParameter String sName Returns String

Call Example

Get UrlParameter sName to StringVariable

Description

URL parameters are parameters that can be passed to a URL as part of the URL's query string. The query string follows the URL and a question mark (?) and is composed of a series of field-value pairs. Within each pair, the field name and value are separated by an equals sign (=). The equals sign may be omitted if the value is an empty string. The series of pairs is separated by the ampersand ('&').

This function will not return the state hash part of a URL of a web application with peApplicationStateMode set to asmHistoryAndUrls. Use StateHash to obtain that.

Sample

This sample shows a URL with a querystring containing two field-value pairs.

http://www.MyWebSite.com?field1=value1&field2=value2

Sample

This sample shows how to retrieve the values of the two URL parameters in the sample above.

String sValue1 sValue2
Get UrlParameter "field1"to sValue1
Get UrlParameter "field2"to sValue2