The first record on a page is identified in the variable CiBookmark, which can be used in a form to get to the next page or the previous page. The form variable CiBookmarkSkipCount should be used with CiBookmark to specify the relative offset from the current page. CiBookmarkSkipCount is typically set to either <%CiMaxRecordsPerPage%>
or <%CiMaxRecordsPerPage%>
, although it could be set to other multiples of CiMaxRecordsPerPage.
Here is an example of a form that will skip to the next page for a sequential query:
<FORM ACTION="<%HTTP_SCRIPT_NAME%>?" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="CiBookmark" VALUE="<%CiBookmark%>" > <INPUT TYPE="HIDDEN" NAME="CiBookmarkSkipCount" VALUE="<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiMaxRecordsPerPage" VALUE="<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiRestriction" VALUE="<%CiRestriction%>" > <INPUT TYPE="HIDDEN" NAME="CiScope" VALUE="<%CiScope%>" > <INPUT TYPE="SUBMIT" VALUE="Next page"> </FORM>
The following example shows how the buttons for going to adjacent pages can be generated conditionally depending upon the variables CiContainsFirstPage and CiContainsLastPage. It also shows how the number of hits on the next page can be displayed for a nonsequential query.
<TABLE> <TR> <TD> <%if CiContainsFirstRecord eq 0%> <FORM ACTION="<%HTTP_SCRIPT_NAME%>?" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="CiBookmark" VALUE="<%CiBookmark%>" > <INPUT TYPE="HIDDEN" NAME="CiBookmarkSkipCount" VALUE="-<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiMaxRecordsPerPage" VALUE="<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiRestriction" VALUE="<%CiRestriction%>" > <INPUT TYPE="HIDDEN" NAME="CiScope" VALUE="<%CiScope%>" > <INPUT TYPE="SUBMIT" VALUE="Previous <%CiMaxRecordsPerPage%> Hits"> </FORM> <%endif%> </TD>
<TD> <%if CiContainsLastRecord eq 0%> <FORM ACTION="<%HTTP_SCRIPT_NAME%>?" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="CiBookmark" VALUE="<CiBookmark%>" > <INPUT TYPE="HIDDEN" NAME="CiBookmarkSkipCount" VALUE="<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiMaxRecordsPerPage" VALUE="<%CiMaxRecordsPerPage%>" > <INPUT TYPE="HIDDEN" NAME="CiRestriction" VALUE="<%CiRestriction%>" > <INPUT TYPE="HIDDEN" NAME="CiScope" VALUE="<%CiScope%>" > <INPUT TYPE="SUBMIT" VALUE="Next <%CiRecordsOnNextPage%> Hits"> </FORM> <%endif%> </TD> </TR> </TABLE>
© 1997 by Microsoft Corporation. All rights reserved.
file: /Techref/language/asp/ix/ixhtxnav.htm, 5KB, , updated: 1997/9/29 02:23, local time: 2024/11/23 14:45,
18.119.141.115:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/language/asp/ix/ixhtxnav.htm"> Microsoft Index Server: Navigating Between Pages in Query Results</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.