PagerStyle.PageLabel Property

Definition

Gets or sets the label used for the current page. The default value is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
[System.ComponentModel.Bindable(true)]
public string PageLabel { get; set; }

Property Value

The label used for the current page.

Attributes

Examples

The following example demonstrates how to use the PageLabel property to set the page label to "Go to page".

C#
void Page_Load(object sender, EventArgs e)  
{  
    if(!IsPostBack)  
    {  
        Form1.PagerStyle.NextPageText = "2";  
    }  
    Form1.PagerStyle.StyleReference = "title";  
    Form1.PagerStyle.PageLabel = "Go to page"  
}  

Remarks

If this property contains an empty string, no label is displayed. The label can include the format specifiers {0} and {1}, which are substituted with the page number of the current page and the total number of pages, respectively, when the label is rendered. For example, the format specifier Page {0} of {1} would show the current position within the total number of pages.

Note

WML devices do not render this property.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also