New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

RadDataPager SEO Paging

Products
Name: Steeleye Stout
Quantity: 24 - 12 oz bottles
Price: $18.00
Units: 20
Available: Yes


Name: Inlagd Sill
Quantity: 24 - 250 g jars
Price: $19.00
Units: 112
Available: Yes


Name: Gravad lax
Quantity: 12 - 500 g pkgs.
Price: $26.00
Units: 11
Available: Yes


Name: Côte de Blaye
Quantity: 12 - 75 cl bottles
Price: $263.50
Units: 17
Available: Yes


Name: Chartreuse verte
Quantity: 750 cc per bottle
Price: $18.00
Units: 69
Available: Yes


Name: Boston Crab Meat
Quantity: 24 - 4 oz tins
Price: $18.40
Units: 123
Available: Yes


Name: Jack's New England Clam Chowder
Quantity: 12 - 12 oz cans
Price: $9.65
Units: 85
Available: Yes


Name: Singaporean Hokkien Fried Mee
Quantity: 32 - 1 kg pkgs.
Price: $14.00
Units: 26
Available: No


Name: Ipoh Coffee
Quantity: 16 - 500 g tins
Price: $46.00
Units: 17
Available: Yes


Name: Gula Malacca
Quantity: 20 - 2 kg bags
Price: $19.45
Units: 27
Available: Yes


Page size:

The following example demonstrates RadDataPager SEO functionality. Changing the current page or page size will lead to a changing of the page url. The first query parameter keeps the value of the current page index and the second query parameter - the page size, if it is different than the default.

  • DefaultVB.aspx
<%@ Page Language="vb" AutoEventWireup="false"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <style type="text/css">
        legend {
            color: inherit;
        }

        fieldset {
            padding: 5px 10px 10px 10px;
            border-color:#f0f0f0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-containers">
        <div class="demo-container">
            <telerik:RadListView ID="RadListView1" Width="97%" AllowPaging="True" runat="server"
                DataSourceID="SqlDataSource1" ItemPlaceholderID="ProductsHolder">
                <LayoutTemplate>
                    <fieldset style="max-width: 910px;" id="FieldSet1">
                        <legend>Products</legend>
                        <asp:Panel ID="ProductsHolder" runat="server">
                        </asp:Panel>
                        <table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
                            <tr>
                                <td>
                                    <telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                                        AllowSEOPaging="true">
                                        <Fields>
                                            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                            <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />
                                            <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                            <telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Page size: " />
                                        </Fields>
                                    </telerik:RadDataPager>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </LayoutTemplate>
                <ItemTemplate>
                    <div style="float: left;">
                        <table cellpadding="0" cellspacing="0" style="width: 300px;">
                            <tr>
                                <td style="width: 20%;">Name:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# Eval("ProductName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>Quantity:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# Eval("QuantityPerUnit") %>
                                </td>
                            </tr>
                            <tr>
                                <td>Price:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:C}") %>
                                </td>
                            </tr>
                            <tr>
                                <td>Units:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# Eval("UnitsInStock") %>
                                </td>
                            </tr>
                            <tr>
                                <td>Available:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# iif(DataBinder.Eval(Container.DataItem,"Discontinued")=false,"Yes","No") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <hr />
                                </td>
                                <td>
                                    <hr />
                                </td>
                            </tr>
                        </table>
                    </div>
                </ItemTemplate>
            </telerik:RadListView>
            <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                ProviderName="System.Data.SqlClient" SelectCommand="SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM [Products]"
                runat="server"></asp:SqlDataSource>
        </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance