Top section

Everything from top of the Wbsp file (or from <!--WB_BeginTemplate--> comment, if it exists) to <!--WB_BeginDetail--> comment is considered to be a Top section. It will be processed by WBSP engine and sent to client, before WBSP processes  the Detail section . It can contain DB related functions , but it will ignore WB_StartRec variable (i.e. for all $wbf functions it will return the value of the first record, and not the record at the position defined in WB_StartRec ).

Here's an example (top section is marked blue)
<!--
[FormFields]
WB_basename=biblio.mdb
wb_rcdset=titles
wb_command=Q
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>Titles</title>
</head>
<body>
<table border="1" cellspacing="0">
<tr>
<td>Year published</td>
<td>Title</td>
<td>ISBN</td>
</tr>

<!--WB_BeginDetail-->
<tr>
<td>$wbf[Year published]</td>
<td>$wbf[title]</td>
<td>$wbf[ISBN]</td>
</tr>
<!--WB_EndDetail-->
</table>
<center>$wbnavigator</center>
</body>
</html>