I have tried to use paging in my page. It seems to be working fine when I put it with the main block of SQL codes
CODE
<%
Dim Conn 'Connection to Database
Dim RS 'RecordSet
Dim SQL 'String for SQL Statements
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.recordset")
Conn.Open strConn
cMaxTopLevel = 8
i_pagenum = 1
SQL = "SELECT * FROM PROMO_CORNETTO_ROYALE"
RS.open SQL,Conn,3,3
i_pagenum=1
if request("page")>1 then i_pagenum=request("page")
RS.pageSize=cMaxTopLevel
for indx = 1 to RS.Pagecount
if indx <> Cint(i_pagenum) then
response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> "
else
current_page = indx
Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> "
end if
next
if i_pagenum>1 then
RS.AbsolutePage=i_pagenum
else
'dont set RS.AbsolutePage
end if
%>
Dim Conn 'Connection to Database
Dim RS 'RecordSet
Dim SQL 'String for SQL Statements
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.recordset")
Conn.Open strConn
cMaxTopLevel = 8
i_pagenum = 1
SQL = "SELECT * FROM PROMO_CORNETTO_ROYALE"
RS.open SQL,Conn,3,3
i_pagenum=1
if request("page")>1 then i_pagenum=request("page")
RS.pageSize=cMaxTopLevel
for indx = 1 to RS.Pagecount
if indx <> Cint(i_pagenum) then
response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> "
else
current_page = indx
Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> "
end if
next
if i_pagenum>1 then
RS.AbsolutePage=i_pagenum
else
'dont set RS.AbsolutePage
end if
%>
However when I attempt to put this with the html portion like this:
CODE
<span class="text">Page
<%
for indx = 1 to RS.Pagecount
if indx <> Cint(i_pagenum) then
response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> "
else
current_page = indx
Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> "
end if
next
if i_pagenum>1 then
RS.AbsolutePage=i_pagenum
else
'dont set RS.AbsolutePage
end if
%>
</span>
<%
for indx = 1 to RS.Pagecount
if indx <> Cint(i_pagenum) then
response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> "
else
current_page = indx
Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> "
end if
next
if i_pagenum>1 then
RS.AbsolutePage=i_pagenum
else
'dont set RS.AbsolutePage
end if
%>
</span>
The page does not refresh when I click on another one. Can anyone tell me what is the problem? It seems really wierd that putting it with the other VB code works and when I bring it to the HTML, it cease to work. I need to complete this portion in less than 4 hrs, so hopefully I get a reply ASAP.

