|
|
The DataList does not include inbuilt support for paging. By
overloading the Fill method of the DataAdapter, however, you can create a
paging mechanism for the DataList
|
|
|
|

|
| |
| In
Header and Footer Templates add header labels as below |
 |
|
Now open Item Templates
|
|

|
|
In Item
Templates a table with 2 columns and add 2 lables as
below
|
|
|
| Now open HTML page by clicking HTML
tab at the bottom of the form |
|

|
|
Update <ItemTemplate> as below
|
|

|
|
Define 4 LinkButtons as
|
ID
|
Text
|
|
lkFirst
|
First
|
|
lkPrevious
|
Previous
|
|
lkNext
|
Next
|
|
lkLast
|
Last
|
|
| Define 3 lable ID as intPageSize,
intRecordCount, and intCurrIndex. Set Vesible FALSE |
| Now, its time to add VB code to
load DataList from SQL Server and do paging. |
|
Imports System.Data.SqlClient


|
| Finally we
will add VB code for 4 LinkButtons:
|
|


|
| Now run and navegate with First,
Next, Previous and Last linkbuttons |
|
|
| |
|
|
| |
|
|
|
|