PagerStyle.PreviousPageText Property

 

Gets or sets the label used for the UI element used to navigate to the previous page. The default value is Previous. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.

Namespace:   System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

[BindableAttribute(true)]
public string PreviousPageText { get; set; }

Property Value

Type: System.String

The label used for the UI element used to navigate to the previous page.

The label can include the format specifier {0}, which is substituted with the page number of the previous page when the label is rendered.

The following example demonstrates how to use the PreviousPageText property to set the previous page label to one less than the current page.

void Form1_PageIndexChanged(object sender, EventArgs e)
{
    Form1.PagerStyle.PreviousPageText = 
        (Form1.CurrentPage - 1).ToString();
    Form1.PagerStyle.NextPageText = (Form1.CurrentPage + 1).ToString();
}

.NET Framework
Available since 1.1
Return to top
Show: