System.Web.UI.WebControls Namespace GridViewPageEventArgs Class
.NET Framework version 2.0
Returns the index of the page selected by the user in the page selection element of a GridView.
Script |
[ int variable = ] GridViewPageEventArgs.NewPageIndex |
variable |
Integer specifying the index of the selected page in the pager element of a GridView. |
The property is read only with no default value.
Use the NewPageIndex property to determine the index of the page selected by the user in the page selection element of the GridView control. This value is often used to set the PageIndex property of the grid to display the selected page.
The following examples demonstrate how to use the NewPageIndex property to determine the index of the page selected by the user, the value of which is then used to set the PageIndex property of the GridView to display the selected page.
GridViewPageEventArgs Members GridView Class