Share via


PagerStyle.PageLabel プロパティ

定義

現在のページに使用するラベルを取得または設定します。 既定値は空の文字列 ("") です。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「ASP.NET を使用した Mobile Apps & サイト」を参照してください。

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

プロパティ値

現在のページに使用するラベル。

属性

次の例では、 プロパティを PageLabel 使用してページ ラベルを "ページに移動" に設定する方法を示します。

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

注釈

このプロパティに空の文字列が含まれている場合、ラベルは表示されません。 ラベルには、書式指定子 {0}{1}を含めることができます。これは、現在のページのページ番号と、ラベルのレンダリング時のページの合計数にそれぞれ置き換えられます。 たとえば、書式指定子 Page {0} of {1} は、ページの合計数内の現在の位置を表示します。

注意

WML デバイスでは、このプロパティはレンダリングされません。

適用対象

こちらもご覧ください