MenuItem.DataItem Property

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

Not applicable.

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.


This property is available only after data binding has occurred.

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0