Pac-Man for the Smartphone 17 Mar 2006 17:23 GMTLearn how Bryan Dougherty updated the classic arcade game Pac-Man for his new Smartphone, with a bit of help from the Windows Mobile 5.0 SDK.
Source: MSDN Custom Paging in ASP.NET 2.0 with SQL Server 2005 15 Mar 2006 00:00 GMTA common pattern in web development is providing paged access to data. Rather than displaying the entire contents of a report
or database table to an end user, developers often show only a subset of records per web page, with controls for moving from
page to page. With ASP.NET 1.x, the DataGrid made paging incredibly simple -
just set the AllowPaging property to True and add a few lines of code in the PageIndexChanged
event handler and you were done! ASP.NET 2.0's
GridView makes
the process even simpler - just check the Enable Paging option from the GridView's smart tag - no code needed.
Of course nothing is free in life, and the tradeoff you make with the ease of checking a checkbox to enable paging (or, in
the DataGrid's case, writing a couple lines of code) is performance. Out of the box, the DataGrid and GridView use
default paging, which is a simple paging model that returns all of the records for each every page of data
shown. When paging through small amounts of data (dozens to a hundred or so records), this inefficiency is likely outweighed
by the ease of adding the feature. However, if you want to page through thousands, tens of thousands, or hundreds of thousands
of records the default paging model is not viable.
The alternative to default paging is custom paging, in which you are tasked with writing code that intelligently grabs
the correct subset of data. It requires a bit more work, but is essential when dealing with sufficiently-sized data. I discuss
how to implement custom paging in ASP.NET 1.x in my book ASP.NET
Data Web Controls Kick Start. In this article we'll look at how to implement custom paging in ASP.NET 2.0 using SQL Server 2005's
new ROW_NUMBER() feature. (For more information on SQL Server's new ranking features, including ROW_NUMBER(),
see Returning Ranked Results with Microsoft SQL Server 2005.)
Read on to learn more!
Read More >
Source: 4GuysFromRolla