Redigera

Dela via


PagerStyle.PreviousPageText Property

Definition

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 Mobile Apps & Sites with ASP.NET.

public:
 property System::String ^ PreviousPageText { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string PreviousPageText { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.PreviousPageText : string with get, set
Public Property PreviousPageText As String

Property Value

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

Attributes

Examples

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

Sub Form1_PageIndexChanged(ByVal sender As Object, _  
    ByVal e As EventArgs)  
    Form1.PagerStyle.PreviousPageText = _  
       (Form1.CurrentPage - 1).ToString()  
End Sub  
void Form1_PageIndexChanged(object sender, EventArgs e)  
{  
    Form1.PagerStyle.PreviousPageText =   
        (Form1.CurrentPage - 1).ToString();  
    Form1.PagerStyle.NextPageText = (Form1.CurrentPage + 1).ToString();  
}  

Remarks

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

Applies to

See also