Form.PagerStyle 属性

定义

获取或设置用于呈现窗体的分页用户界面的样式。Gets or sets the style used to render the form's pagination UI. 默认值为空字符串 ("")。The default value is an empty string (""). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

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

属性值

PagerStyle

用于呈现窗体的分页用户界面的样式。The style used to render the form's pagination UI.

示例

下面的代码示例演示如何使用 PagerStyle 属性。The following code example demonstrates how to use the PagerStyle property. 此代码示例摘自一个更大的属性示例 ControlToPaginateThis code example is from a larger example for the ControlToPaginate property.

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

注解

如果以编程方式设置此属性,则不会为每个请求保留该属性。If this property is set programmatically, it is not persisted for each request. 如果以声明方式设置该属性,则会为每个请求保留该属性。If the property is set declaratively, the property is persisted for each request.

适用于