asp.net.ph

FormView.DataItem Property

System.Web.UI.WebControls Namespace   FormView Class


.NET Framework version 2.0

Returns the data item bound to the FormView control.

Syntax


Script Object variable = FormView.DataItem

Property Value


variable An Object that represents the data item bound to the FormView control.

The property is read only with no default value.

Remarks

Use the DataItem property to access the data item bound to the FormView control. The data item is often used to access the field values of the current record directly. The type of the Object returned by this property varies depending on the data source. For example, when a SqlDataSource control is bound to the FormView control, a DataRowView object is returned.

NOTE: This property is available only after data binding has occurred. Before data binding occurs, this property returns a null reference ( Nothing in Visual Basic ). This property is also not applicable when the FormView control is in insert mode and returns a null reference ( Nothing in Visual Basic ).

See Also

FormView Members   DataItemCount   DataItemIndex Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph