แก้ไข

แชร์ผ่าน


Form.PagerStyle Property

Definition

Gets or sets the style used to render the form's pagination UI. The default value is an empty string (""). This API is obsolete. 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

Property Value

The style used to render the form's pagination UI.

Examples

The following code example demonstrates how to use the PagerStyle property. This 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

Remarks

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.

Applies to

See also