SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 200 | Next

Joydip Kanjilal

"ASP.NET Data Presentation Controls Essentials"

Here is the code that you can write in your .aspx file to use a DataPager
control.
PagedControlID="GridView1" PageSize="4">

PreviousPageText="Previous Page"/>


Note that you can specify the list control with which you want to enable paging
using the PagedControlID and you can set the page size of your choice using the
PageSize property. I will now illustrate how easily you can achieve customized
paging with the ListView control using a DataPager. Here is the code that you need
to write in your .aspx file.
DataSourceID="SqlDataSource1"
DataKeyNames="EmployeeID" ItemContainerID="SqlDataSource1">

Chapter 8
[ 225 ]








runat="server">

EmployeeIDEmployeeNameJoiningDateSalaryDepartmentID


PageSize="4" PagedControlID="ListView1">









Text='<%# Eval("EmployeeID") %>'/>


Text='<%# Eval("EmployeeName") %>'/>


Text='<%# Eval("JoiningDate") %>'/>





Text='<%# Eval("DepartmentID") %>'/>


Working with LINQ
[ 226 ]


ConnectionString="<%$
ConnectionStrings:joydipConnectionString %>"
SelectCommand="SELECT [EmployeeID], [EmployeeName],
[JoiningDate], [Salary], [DepartmentID] FROM [Employee]">

And, here is the output when you execute the sample application.


Pages:
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6