MenuItemBinding::TargetField Property
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.
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 Value
Type: System::StringThe 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. 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. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: