This documentation is archived and is not being maintained.

MenuItem.DataItem Property

Note: This property is new in the .NET Framework version 2.0.

Gets the data item that is bound to the menu item.

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

public Object DataItem { get; }
/** @property */
public Object get_DataItem ()

public function get DataItem () : Object

Property Value

An Object that represents the data item that is bound to the menu item. The default value is a null reference (Nothing in Visual Basic), which indicates that the menu item is not bound to any data item.

When the Menu control is bound to a data source, such as an XmlDataSource object, this property is set to the data item that is bound to this specific menu item. This property is commonly used to access the value of the data item.

NoteNote

This property is available only after data binding has occurred.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: