Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

Phones.CSP — %Request

Each CSP page contains a %request object. This object, an instance of the %CSP.Request class, contains a great deal of data. In particular, it contains any query string data appended to the URL of the page when the page is requested.

Here is an example View Phones hyperlink generated by Person.CSP:


<a href='Phones.CSP?ID=1'>View Phones</a>

The URL for the hyperlink, the value of the href attribute, is Phones.CSP?ID=1. Clicking the hyperlink on Person.CSP requests Phones.CSP. The query string begins after the “?”. In this case it contains the name-value pair ID=1.

The query string data is available to Phones.CSP through the %request object. We will include the following line of code in Phones.CSP to retrieve the ID:


ID = %request->Get("ID")
Feedback