Share via


Form.PagerStyle 屬性

定義

取得或設定用來呈現表單之分頁 UI 的樣式。 預設值為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

public:
 property System::Web::UI::MobileControls::PagerStyle ^ PagerStyle { System::Web::UI::MobileControls::PagerStyle ^ get(); };
public System.Web.UI.MobileControls.PagerStyle PagerStyle { get; }
member this.PagerStyle : System.Web.UI.MobileControls.PagerStyle
Public ReadOnly Property PagerStyle As PagerStyle

屬性值

用來呈現表單之分頁 UI 的樣式。

範例

下列程式代碼範例示範如何使用 PagerStyle 屬性。 此程式代碼範例來自 屬性的較大範例 ControlToPaginate

void Page_Load(object sender, EventArgs e)
{
    // Set the pager text properties
    if (!IsPostBack)
        Form1.PagerStyle.NextPageText = "Go Next >";
    else
    {
        // For postback, set different text
        Form1.PagerStyle.NextPageText = "Go More >";
        Form1.PagerStyle.PreviousPageText = "< Go Prev";
    }
}
Private Sub Page_Load(ByVal sender As Object, _
    ByVal e As EventArgs)
    
    ' Set the pager text properties
    If Not IsPostBack Then
        Form1.PagerStyle.NextPageText = "Go Next >"
    Else
        ' For postback, set different text
        Form1.PagerStyle.NextPageText = "Go More >"
        Form1.PagerStyle.PreviousPageText = "< Go Prev"
    End If
End Sub

備註

如果以程式設計方式設定此屬性,則不會針對每個要求保存此屬性。 如果屬性是以宣告方式設定,則會針對每個要求保存 屬性。

適用於

另請參閱