Skip to main content

HTML for the ShowTimes Page

Next, let's create the ShowTimes page. Use Studio to do this. Name the file ShowTimes.csp and save it in csp/user.

Add the following HTML to the page. Most of it is familiar: we are, once again, using a <csp:query> tag to retrieve data, a <csp:while> tag to loop through the results, and Caché data references, such as


to add data to our page.

The new element here is the “P1” attribute in our <csp:query>. You will recall that P1 was used in the query to identify which film interests us.

<html> <body>
<csp:query name="Times" classname="Cinema.Show"
    queryname="ShowTimes" P1='#(%request.Data("FilmID",1))#'>

<table cellpadding=5>

<csp:while condition="Times.Next()">
</body> </html>
FeedbackOpens in a new tab