FormView.DataItemIndex Property

 

Gets the index of the data item bound to the FormView control from the data source.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[<BrowsableAttribute(false)>]
abstract DataItemIndex : int with get
[<BrowsableAttribute(false)>]
override DataItemIndex : int with get

Property Value

Type: System.Int32

The index of the data item bound to the FormView control from the data source.

Use the DataItemIndex property to determine the index of the data item bound to the FormView control from the data source. This property contains the same value as the PageIndex property.

System_CAPS_noteNote

This property is not applicable when the FormView control is in insert mode. When the control is in insert mode, the DataItemIndex property returns -1.

.NET Framework
Available since 2.0
Return to top
Show: