GetParam

Description

Retrieves a parameter passed to the current page.

Applies to

PSDocumentClass object

Syntax

psDocument.GetParam( argvar )

Argument

Description

argvar

The name of a parameter passed to the current page

Returns

String. Returns the value of the specified parameter.

Usage

At runtime, GetParam has the following behavior:

Application server

Runtime behavior

ASP

Accesses either the QueryString or the Form collection of the Request object:

  • When the METHOD attribute of a <FORM> is GET (or when data is passed directly in the HREF attribute of an <A> element), GetParam accesses the specified parameter in the QueryString collection.

  • When the METHOD attribute of a <FORM> is POST, GetParam accesses the specified parameter in the Form collection.

JSP

Calls the getParameter method on the request object.

Examples

Example 1

The following example retrieves the value of the “EmpID” parameter:

empid = psDocument.GetParam("EmpID");