This documentation is archived and is not being maintained.
DataBinder::GetDataItem Method (Object, Boolean%)
Visual Studio 2010
Retrieves an object's declared data item, indicating success or failure.
Assembly: System.Web (in System.Web.dll)
public: static Object^ GetDataItem( Object^ container, [OutAttribute] bool% foundDataItem )
Parameters
- container
- Type: System::Object
The object reference against which the expression is evaluated. This must be a valid object identifier in the page's specified language.
- foundDataItem
- Type: System::Boolean%
A Boolean value that indicates whether the data item was successfully resolved and returned. This parameter is passed uninitialized.
Return Value
Type: System::ObjectAn object that represents the container's declared data item. Returns nullptr if no data item is found or if the container evaluates to nullptr.
An object's data item is identified two ways. If the container object implements the IDataItemContainer interface, the DataItem property identifies the data item, and is returned. Otherwise, the method attempts to resolve and return a container property named "DataItem".
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: