MenuItemBinding.TargetField Property
Assembly: System.Web (in system.web.dll)
[TypeConverterAttribute(L"System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public: property String^ TargetField { String^ get (); void set (String^ value); }
/** @property */ public String get_TargetField () /** @property */ public void set_TargetField (String value)
public function get TargetField () : String public function set TargetField (value : String)
Not applicable.
Property Value
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 | Description |
|---|---|
| _blank | Renders the content in a new window without frames. |
| _parent | Renders the content in the immediate frameset parent. |
| _self | Renders the content in the frame with focus. |
| _top | Renders the content in the full window without frames. |
Note: |
|---|
| 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 ASP.NET and XHTML Compliance. When creating accessible Web pages, it is strongly recommended you avoid using the Target property to target another window. For more information, see 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.
Note: |
|---|
| 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.
Note: |
|---|
| If the Target and TargetField properties are both set, the TargetField property takes precedence. |
Note: