Jump to content
xisto Community
Sign in to follow this  
darran

Paging In Asp

Recommended Posts

A wierd problem I am encountering here ... I would appreciate it if I can get any advice ASAP

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

<%Dim Conn		'Connection to DatabaseDim RS			'RecordSetDim SQL			'String for SQL StatementsSet Conn = Server.CreateObject("ADODB.Connection")Set RS = Server.CreateObject("ADODB.recordset")Conn.Open strConncMaxTopLevel = 8i_pagenum = 1SQL = "SELECT * FROM PROMO_CORNETTO_ROYALE"RS.open SQL,Conn,3,3i_pagenum=1if 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 ifnextif i_pagenum>1 then	RS.AbsolutePage=i_pagenumelse	'dont set RS.AbsolutePageend if%>

However when I attempt to put this with the html portion like this:

<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 ifnextif i_pagenum>1 then	RS.AbsolutePage=i_pagenumelse	'dont set RS.AbsolutePageend 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.

Share this post


Link to post
Share on other sites

I don't do ASP, but open up the file in your browser and then do a View > Source to see what the html output looks like. Might be a clue in there. Perhaps the anchor tags are not being written properly. The View > Source will tell you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.