From Xojo Documentation


WebSession.URLParameter(Name as String) As String

Supported for all project types and targets.

Returns the value of the specified URL parameter. If the parameter was specified more than once, the value will be a comma separated list of values.


The URL parameter are the special values that are passed along with the URL after the "?" character. For example:


Additional parameters are separated by the "&" character. Note that all parameters must be URL encoded (%20 instead of spaces, for example).

If the requested URL parameter is not available, this function returns "".

For URLs that contain a port number, you have to include a "/" before the first parameter:


This code in the Session.Open event handler displays the URL parameters in a Text Area on the main web page:

If Self.URLParameterCount > 0 Then
Var parameterName, value As String
For i As Integer = 0 To Self.URLParameterCount - 1
parameterName = Self.URLParameterName(i)
value = Self.URLParameter(parameterName)
WebPage1.TextArea1.AppendText(parameterName + " = " + value + EndOfLine)
End If

When you run a simple app, open a new tab and put this URL in the address field:


to see the parameters displayed in the TextArea.

See Also

WebSession.URLParameterCount, WebSession.URLParameterExists, WebSession.URLParameterName