アンカー・タグの追加
次に、ユーザがこのイメージをクリックしたときに表示されるページのURLを指定するために、アンカー・タグ (a) を追加します。
<a href='ShowTimes.csp?FilmID=#(FilmList.Get("ID"))#'>
これは、ページ (ShowTimes.csp)、名前/値の組み合わせの名前半分 (FilmID=) と TopFilms クエリの ID 要素から取得される値を含みます。
—TopPicks.csp—
TopPicks.csp
<html> <body>
<h2><font color="#0000FF">Today's Top Picks</font></h2>
<table border=0>
<csp:query name=FilmList classname="Cinema.Film" queryname="TopFilms">
<csp:while condition="FilmList.Next()">
<tr>
<td>
<b>#(FilmList.Get("Title"))#</b><br>
#(FilmList.Get("Description"))#<br>
<b>Genre</b>
#(FilmList.Get("CategoryName"))#
<b>Length</b>
#(FilmList.Get("Length"))#
<b>Rating</b>
#(FilmList.Get("Rating"))#<br> <br>
</td>
<td>
<a href='ShowTimes.csp?FilmID=#(FilmList.Get("ID"))#'>
<img src="ShowTimes.gif" width="130" height="39" border="0">
</a>
</td>
</tr>
</csp:while>
</table>
</body> </html>