here is the include page <!-- #include
virtual="/carmartnew/include/topRS.asp.asp" -->code:
<% 'Option Explicit
'response.buffer = true%>
<%
Dim strQrySelect3, RowCnt, RecSet3, PerPage, PageNum, PageCnt, rsOutput3
RowCnt = 0
RowCnt = rscount ' rscount is my recordset from DB
if RowCnt = 0 then
Response.Write "No rows found."
Response.End
end if
PerPage = Trim(Request.QueryString("PerPage"))
PageNum = Trim(Request.QueryString("PageNum"))
If PerPage = "" or (len(PerPage)>0 and not isnumeric(PerPage)) Then _
PerPage = 50
If PageNum = "" or (len(PageNum)>0 and not isnumeric(PageNum)) Then _
PageNum = 1
PerPage = PerPage
PageNum = PageNum
'response.write "RowCnt :" &RowCnt&"<br>"
'response.write "PerPage :" &PerPage&"<br>"
PageCnt = RowCnt \ PerPage
if RowCnt mod PerPage <> 0 then PageCnt = PageCnt + 1
if PageNum < 1 Then PageNum = 1
if PageNum > PageCnt Then PageNum = PageCnt
Dim url, urlParts, pageName
url = Request.ServerVariables("SCRIPT_NAME")
urlParts = split(url, "/")
pageName = urlParts(ubound(urlParts))
%>
<script language="JavaScript" type="text/javascript">
function go(p)
{
if (p!='current')
window.location.href = "<%=pageName%>?"
+"PerPage=<%=PerPage%>&"
+"PageNum="+p;
}
</script>
<%
response.write RowCnt & " rows found. Showing " & _
" page " & PageNum & " of " & PageCnt & "."
response.write " <select onchange='go(this.value);'>"
for i = 1 to PageCnt
link = i: s = ""
if i = PageNum then link = "current": s=" SELECTED"
response.write "<option value=" & link & s & ">" **
I don't get any value here in select list.
response.write "Page " & i
next
Response.Write "</select><p>"
%>
Here is the code of CODE page as per your article where I am including above
page
** This code suppose to do what??? need more explanation...
Dim gr, rstop
rstop = PerPage * PageNum
rstart = rstop - (PerPage - 1)
rs.move(rstart-1)** main change
rsOutput2.move(rstart-1)
if rstop > RowCnt - 1 then PerPage = (RowCnt - 1) - rstart
gr = rs.GetRows(PerPage)
gr = rsOutput2.GetRows(PerPage)
response.write "gr" & gr
for i = 0 to perpage-1
artist = gr(0, i)
title = gr(1, i)
response.write "artist" & artist
next
Thanks much! Would you also do consulting?