PagerStyle.PageLabel 屬性

定義

取得或設定目前頁面所用的標籤。 預設值為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

[System.ComponentModel.Bindable(true)]
public string PageLabel { get; set; }

屬性值

目前頁面所用的標籤。

屬性

範例

下列範例示範如何使用 PageLabel 屬性將頁面標籤設定為 「移至頁面」。

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 裝置不會轉譯此屬性。

適用於

產品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

另請參閱