|
-
Apr 18th, 2007, 05:26 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] RecordsPerPage
Hi all, I'm using ASP.NET (VB) and the "Repeater" to show results from database (MS ACCESS) .. I want to know how can I make it to show only the first or top 10 results in my database ... (Such as in classic asp i can use RecordsPerPage function to set this).
This is the sub where I check if there was results (show them) or if not (redirect):
Code:
Sub CheckHasRows(ByVal dbread)
If dbread.hasrows Then
Table.datasource = dbread
Table.databind()
dbread.close
Else
Response.Redirect("/INDEX.aspx")
End If
End Sub
-
Apr 18th, 2007, 05:59 AM
#2
Fanatic Member
Re: RecordsPerPage
If you are using ASP.NET 2.0 then you may use GridView control and Enable Paging through smart tag.
PageSize is the maximum number of rows it will show per page, its default value is 10.
-
Apr 18th, 2007, 09:06 AM
#3
Re: RecordsPerPage
SELECT TOP 10 * FROM tablename WHERE conditions...blahblah
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|