Working with Pagination


The idea behind server-based pagination is to automatically break up a block of content from a control or group of controls in a page into smaller pieces of rendering accessed with multiple page requests. Breaking up blocks of content can be important to enabling your application for mobile browsers because wireless connections typically have less bandwidth than bandwidth available in a wired connection and limits in client memory can be difficult to manage. It can be important in creating a user interface that is consistent and easy to navigate in a variety of devices. Without pagination, some mobile browsers tasked with rendering a large amount of content will display an error message to the user that simply states “Deck Overflow.” This explanation doesn’t present the user with options or even a potential workaround for the problem. (We should emphasize that pagination itself does not fix the problem of deck overflow—it simply circumvents it.)

The pagination algorithm targets page boundaries by limiting the number of lines of content that are included in the rendered output for display on the device. The memory limits of the device are, of course, not aware of any user- interface elements. The byte count can be exceeded by a single image that is too large, or the content can be within the memory limits even though the user must scroll through many pages of output.

You can enable pagination on a form element by setting the Pagination attribute to true, or you can specify that a control in the form be considered for pagination by setting the form’s ControlToPaginate property equal to the ID of the control. Allowing pagination does not force the content to be split up across pages; it simply signals to the MobilePage class that the form should perform the pagination calculations and break up the output of the control, if warranted.




Microsoft ASP. NET Coding Strategies with the Microsoft ASP. NET Team
Microsoft ASP.NET Coding Strategies with the Microsoft ASP.NET Team (Pro-Developer)
ISBN: 073561900X
EAN: 2147483647
Year: 2005
Pages: 144

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net