Redigera

Dela via


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.

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

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".

Private Sub Page_Load(ByVal sender As System.Object, _  
    ByVal e As System.EventArgs) Handles MyBase.Load  
    If Not IsPostBack  
        Form1.PagerStyle.NextPageText = "2"  
    End If  
    Form1.PagerStyle.StyleReference = "title"  
    Form1.PagerStyle.PageLabel = "Go to page"  
End Sub  
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

See also