docs.intersystems.com
Caché Server Pages QuickStart
%CSP.Request Example: Query String
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

A query string is a set of name-value pairs appended to a URL with a “?” symbol. For example, here is a url with the name value pair “OBJID=1” in its query string:

http://127.0.0.1:8972/csp/user/Contact.csp?OBJID=1
The CSP Server places all of the name-value pairs from a query string into the Data property of the %request object sent to the CSP page. The following code retrieves the value of OBJID from the Data property of %request:
$Get(%request.Data("OBJID",1))
Here is a <csp:object> tag that binds the Contact object with the object id passed in on the URL's query string:
<csp:object name="objForm" classname="CSPTutorial.Contact" 
OBJID=#($Get(%request.Data("OBJID",1)))#/>


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA