NumericPagerField.NextPageText Property


Gets or sets the text that is displayed for the next-page button.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public string NextPageText { get; set; }

Property Value

Type: System.String

The text that is displayed for the next-page button. The default is "…".

When the ButtonType property is set to ButtonType.Image, the text specified in the NextPageText property is used as the alternate text for the image. On browsers that support tooltips, this text is also displayed as a tooltip for the corresponding button.

The value of this property is stored in view state. It can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

The following example shows how to customize the text that is displayed for the next-page button of the pager field in a DataPager control.

<%@ Page language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" >
  <head id="Head1" runat="server">
    <title>NumericPagerField Example</title>
    <form id="form1" runat="server">

      <h3>NumericPagerField Example</h3>

      <h4>Products List</h4>

      <asp:ListView runat="server" ID="ProductListView"
          <table cellpadding="2" width="640px" runat="server" id="tblProducts">
            <tr runat="server" id="groupPlaceholder">
          <br />
          <asp:DataPager ID="DataPager1" runat="server" PageSize="6" >
                NextPageText="Next >>"
                PreviousPageText="Previous <<" />
          <tr runat="server" id="ProductRow">
            <td runat="server" id="itemPlaceholder"></td>
          <td runat="server">
            <asp:Image ID="ProductImage" runat="server"
              ImageUrl='<%#"~/images/" + Eval("ThumbnailPhotoFileName") %>' />
              <asp:Label ID="ProductName" runat="server" 
                Text='<%# Eval("Name") %>' 
                Font-Italic="true" />
              <br />
              <asp:Label ID="Price" runat="server" Text='<%# Eval("ListPrice", "{0:c}")%>' />
              <br /><br />

      <!-- This example uses Microsoft SQL Server and connects      -->
      <!-- to the AdventureWorks sample database. Use an ASP.NET    -->
      <!-- expression to retrieve the connection string value       -->
      <!-- from the Web.config file.                                -->
      <asp:SqlDataSource ID="ProductsDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:AdventureWorks_DataConnectionString %>"
        SelectCommand="SELECT P.ProductID, P.Name, P.Color, P.ListPrice, 
          PF.ThumbnailPhotoFileName, P.Size
          FROM Production.Product AS P 
          INNER JOIN Production.ProductProductPhoto AS PPF ON P.ProductID = PPF.ProductID 
          INNER JOIN Production.ProductPhoto AS PF ON PPF.ProductPhotoID = PF.ProductPhotoID" >


.NET Framework
Available since 3.5
Return to top