WebGrid.PageIndex Property

Gets or sets the index of the current page of the WebGrid instance.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Property PageIndex As Integer 
    Get 
    Set
'Usage
Dim instance As WebGrid 
Dim value As Integer 

value = instance.PageIndex

instance.PageIndex = value
public int PageIndex { get; set; }
public:
property int PageIndex {
    int get ();
    void set (int value);
}
member PageIndex : int with get, set
function get PageIndex () : int 
function set PageIndex (value : int)

Property Value

Type: System.Int32
The index of the current page.

Remarks

If paging is enabled, the first page of a WebGrid instance has an index of 1.

If paging is not enabled, getting the value of the PageIndex property returns 0, and trying to set the value of the PageIndex property causes an exception.

See Also

Reference

WebGrid Class

System.Web.Helpers Namespace