GeekArticles
Database
SQL Server
Database
SQL ServerUsing ASP.NET 3.5's ListView and DataPager Controls: Creating an SEO-Friendly Paging Interface
<p>
The GridView, FormView, and DetailsView controls all contain built-in paging functionality. By setting a few properties, possible to have any of these controls automatically
include a paging interface. The ListView, however, does not include built-in paging functionality. Instead, Microsoft decoupled the paging logic from the ListView and moved it
into a separate Web control - the DataPager. <a Through Data with the ListView and DataPager Controls</a>,
an earlier article in this series, explored how to use the DataPager to implement a paging interface for the ListView.
</p><p>
By default, the DataPager renders Buttons, LinkButtons, or ImageButtons in the paging interface for the Next, Previous, First, Last, and numeric page number buttons. When clicked,
these buttons cause a postback, at which point the appropriate set of records are bound to the ListView. Unfortunately, search engines cannot crawl a site using postbacks; instead,
they rely on links they find on your site. Consequently, a search engine will only index the <i>first</i> page of data displayed by a ListView, because it cannot reach the
subsequent pages. Also, users cannot bookmark a particular page of data.
</p><p>
The good news is that it is quite easy to modify the default behavior. This article shows how to configure the DataPager to use hyperlinks and the querystring to
page through a data (rather than postbacks) to create an SEO-friendly paging interface. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
Read Next: 2009's Most Popular Articles
Related Topics
Subscribe via RSS
SQL Server
- Naming Database Objects: Part II
- Trace Messages Part V: Trace Cleanup
- Naming Database Objects: Part I
- Multiple-Child Aggregation
- Creating SQL Tables for an Integrating Application Using Dexterity
- SQL Server 2005 Beta 2 Transact-SQL Enhancements
- .NET Rocks! - Brian Larson on SQL Server Reporting Services
- Computing the Trimmed Mean in SQL
- SQL Server 2000 Gains on Oracle
- Separator First Formatting (SFF)
