سلام از اين كد استفاده كن ولي از كانكشنش و نام صفحت فراموش نكن و اونو غيير بده-ضمنا اگه ميخواي هميشه از اين روش استفاده كني سعي كن ساختار اين كد رو بفهمي
<table>
<!--#INCLUDE VIRTUAL="/includes/connection.asp" -->
<%
DIM mySQL, objRS
mySQL = "SELECT * FROM tblCustomerInfo" Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.CursorType = 1
objRS.Open mySQL, objConn
DIM intPageRecords, intRecords, intRecordCount, intCurrentPage
DIM intNumberOfPages, intDisplayPage
intPageRecords = Request.Querystring("page")
IF intPageRecords = "" THEN intPageRecords = 1 : intRecords = 1
intRecords = intPageRecords
intPageRecords = ((intPageRecords - 1) * 10) +1
intRecordCount = 0
IF NOT objRS.EOF THEN
objRS.Move (intPageRecords - 1)
DO WHILE intRecordCount < 10 and NOT objRS.EOF
%>
<tr><td><%=objRS("Email")%> - <%=objRS("Name")%></td></tr>
<%
objRS.MoveNext
intRecordCount = intRecordCount +1
Loop
END IF
%>
</table>
<%=intPageRecords%> - <%=intPageRecords+(intRecordCount-1)%> of <%=(objRS.RecordCount)%> customers
<p>Scroll Through More Customers
<%
intCurrentPage = Request.Querystring("page")
IF intCurrentPage = "" THEN intCurrentPage = 1
intNumberOfPages = int(objRS.RecordCount \ 10)
IF objRS.RecordCount MOD 10<> 0 THEN intNumberOfPages = intNumberOfPages + 1
Response.Write("Pages: [")
FOR intDisplayPage = 1 TO intNumberOfPages
IF Cint(intDisplayPage) = Cint(intCurrentPage) THEN
Response.Write " <b>" & intDisplayPage & "</b> "
ELSE
Response.Write " <a href=""news.asp?page=" & intDisplayPage & """>" & intDisplayPage &_
"</a> "
END IF
NEXT
Response.Write ("]")
%>