GeekArticles
Database
SQL Server
Database
SQL ServerUsing ASP.NET 3.5's ListView and DataPager Controls: The Ultimate DataPager Interface
<p>
The <a installment</a> in this ongoing article series showed how to configure the DataPager control to
generate an SEO-friendly paging interface. By default, the DataPager renders its paging interface as a series of Buttons, LinkButtons, or ImageButtons that, when clicked, trigger
a postback. The problem with postbacks is that they are not crawled by search engine spiders, meaning that with the default behavior only the first page of data will make it
into the search indexes. Fortunately, the paging interface can be configured to include the page number in the querystring. When configured this way,
the DataPager renders its paging interface using hyperlinks with URLs like <code>Products.aspx?Page=<i>PageNumber</i></code>. With this approach a search engine will happily
crawl through each page of data.
</p><p>
Shortly after publishing <a an SEO-Friendly Paging Interface</a>, a number of readers asked if it would
be possible to create a paging interface that moved the page number from the querystring into the URL. Rather than having a paging interface that linked to pages
with URLs like <code>Products.aspx?Page=<i>PageNumber</i></code>, these readers wanted to have URLs like: <code>Products/<i>PageNumber</i></code>. Such terse, descriptive URLs
are possible with <a Routing</a>, a feature added to the .NET Framework 3.5 SP1. While typically used
in <a MVC</a> applications, <a Routing can also be used in Web
Form applications</a>.
</p><p>
This article shows how to use ASP.NET Routing with the ListView and DataPager controls to create the ultimate paging interface. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
Read Next: URL Routing in ASP.NET 4.0
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)
