PagerStyle.PageLabel 屬性

定義

取得或設定目前頁面所用的標籤。 預設值為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 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

屬性值

目前頁面所用的標籤。

屬性

範例

下列範例示範如何使用 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 裝置不會轉譯此屬性。

適用於

另請參閱