MenuItemBinding.TargetField Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the name of the field from the data source to bind to the Target property of a MenuItem object to which the MenuItemBinding object is applied.

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

[TypeConverterAttribute("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public string TargetField { get; set; }

Property Value

Type: System.String

The name of the field to bind to the Target of a MenuItem to which the MenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

When the Menu control is bound to a data source, use the TargetField property to specify the name of the field to bind to the MenuItem.Target property of a MenuItem object.

The MenuItem.Target property specifies the window or frame in which to display the Web content linked to a menu item when that menu item is clicked. Values must begin with a letter in the range of A through Z (case-insensitive), except for certain special values that begin with an underscore, as shown in the following table.

Target value



Renders the content in a new window without frames.


Renders the content in the immediate frameset parent.


Renders the content in the frame with focus.


Renders the content in the full window without frames.


The Target property renders as a target attribute. The target attribute on anchor elements is not allowed in the XHTML 1.1 document type definition. Do not set the Target property if the rendered output for the MenuItemBinding must be XHTML 1.1 compliant. For more information, refer to the topic XHTML Standards in Visual Studio and ASP.NET.

When creating accessible Web pages, it is strongly recommended you avoid using the Target property to target another window. For more information, see NIB: ASP.NET Accessibility.

Note that setting this property overrides the Menu.Target property of the Menu control for this menu item. Setting the Menu.Target property to open a new window can make it difficult for users of assistive technology devices to use the page.


You can override enabling an individual menu item by setting its MenuItem.Target property directly.

If the data source contains multiple tables or attributes, you must first establish the binding criteria by setting the Depth property, the DataMember property, or both.


If the Target and TargetField properties are both set, the TargetField property takes precedence.

.NET Framework
Available since 2.0
Return to top