Hej, min sidindelning fungerar inte, jag vet inte vad för fel jag har gjort.
jag hoppas ni har möjlighet att se över koden, och då kanske ni finner felet.
Jag vill att den endast visar 20 bilder per sida, men alla bilder visas.
tack på förhand.
<%Session.Codepage = 65001
Response.CharSet = "utf-8"%>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db1.mdb")
' Nedan hämtar och listar bilder
Set RecSet3 = Server.CreateObject("ADODB.Recordset")
recset3.CursorLocation = 3
recset3.PageSize = 20
SQL3 = "Select * From bilder where id=" & Request.querystring("id")&""
RecSet3.Open SQL3, Connect, 3, 3
%>
<%
'--------- sidindelning -------------------
Dim sida3,rad3
sida3 = Trim(Request.QueryString("sida3"))
If sida3 = "" Then
sida3 = 1
End if
'recset3.PageSize = 2
recset3.AbsolutePage = sida3
rad2=0%>
<ul class="podstrony">
<%
If recset3.PageCount > 1 then
For i = 1 to recset3.PageCount
If CLng(sida3) = i Then
Response.Write "<li class='wybrane'> <span >" & i & "</span></li>"
Else%>
<% if request.querystring("id")="" then %>
<li><a href="#" onclick="fetch('fotogalleri.asp?sida=<%= i %>', 'container_div')"><%= i %></a></li>
<% else %>
<li><a href="#" onclick="fetch('fotogalleri.asp?sida=<%= i %>&id=<%=request.querystring("id")%>', 'container_div')"><%= i %></a></li>
<% end if %>
<%End If
Next
End If%>
</ul>