Adding Query Data
Next, we begin adding data from the query to our page. We do this by calling the GetDataByName method, passing the name of the query element as a parameter.
This method call is enclosed in:
#( ... )#
characters, which indicate the presence of a Caché expression. When the page is generated, this expression is evaluated (in this case, the method is called) and the resulting value is added to the page.
<html> <body> <font color="#0000FF" size="+2"><b>Today's Top Picks</b></font> <table border=0> <csp:query name=FilmList classname="Film" queryname="TopFilms"> <tr> <td>#(FilmList.GetDataByName("Title"))#</td> <td> </td> </tr> </table> </body> </html>
Copy code to clipboard