getParametersCount (XSPUrl - JavaScript)

Gets the number of parameters in the query string.

Defined in

XSPUrl (JavaScript)

Syntax

getParametersCount() : int
Return value Description
int The number of parameters.

Example

This example gets the number of parameters in the URL for the current context.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var url : XSPUrl;

try {
	url = context.getUrl();
	var n = url.getParametersCount();
	p("getParametersCount = " + n);

} catch(e) {
	p("Error = " + e);
}

Print output from the example might be as follows:

<<<getParametersCount = 7>>>