System.Web.UI.WebControls.FormView.PagerTemplate Property

Gets or sets the custom content for the pager row in a System.Web.UI.WebControls.FormView control.

Syntax

[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.FormView))]
[System.ComponentModel.DefaultValue(null)]
public virtual System.Web.UI.ITemplate PagerTemplate { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

A pager row is displayed in a System.Web.UI.WebControls.FormView control when the paging feature is enabled (when the FormView.AllowPaging property is set to true). The pager row contains the controls that allow the user to navigate to the different pages in the control. Instead of using the built-in pager row user interface (UI), you can define your own UI by using the FormView.PagerTemplate property.

Note:

When the FormView.PagerTemplate property is set it overrides the built-in pager row UI.

To specify a custom template for the pager row, first place <PagerTemplate> tags between the opening and closing tags of the System.Web.UI.WebControls.FormView control. You can then list the contents of the template between the opening and closing <PagerTemplate> tags. To control the appearance of the pager row, use the FormView.PagerStyle property.

Typically, button controls are added to the pager template to perform the paging operations. The System.Web.UI.WebControls.FormView control performs a paging operation when a button control with its CommandName property set to "Page" is clicked. The button's CommandArgument property determines the type of paging operation to perform. The following table lists the command argument values supported by the System.Web.UI.WebControls.FormView control.

"Next"

Navigates to the next page.

"Prev"

Navigates to the previous page.

"First"

Navigates to the first page.

"Last"

Navigates to the last page.

Integer value

Navigates to the specified page number.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0