System.Web.UI.WebControls Namespace MenuItem Class
.NET Framework version 2.0
Sets or retrieves the target window or frame in which to load the Web page content associated with the current MenuItem.
Inline |
<asp:menuitem target = strTarget | '_blank' | '_parent' | '_self' | '_top' ... > |
Script |
MenuItem.Target [ = strTarget | '_blank' | '_parent' | '_self' | '_top' ] |
strTarget |
The name of the target window or frame to load the Web page content into. |
Values must begin with a letter in the range of A-Z or a-z, except for these special values which begin with an underscore:
_blank |
Renders the content in a new, unframed window. |
_parent |
Renders the content in the immediate frameset parent. |
_self |
Renders the content in the current frame. |
_top |
Renders the content in the full, unframed window. |
The property is read/write with a default value that depends on the URL and site. If the user does not leave the site, the default is _self, but if the user exits to a new site, the default is _top.
Use the Target property to specify the frame or window in which to display the Web page content associated with the current MenuItem.
If there is no frame or window that matches the specified target, a new window is opened for the linked content.
CAUTION: In HTML 4.0, Target attribute values are case-insensitive, so that _top and _TOP have the same meaning. However, most browsers treat this value as case-sensitive and do not recognize _TOP as having the special meaning as described for _top.
NOTE: Setting this property overrides the target window or frame specified by the Menu.Target property.
MenuItem Members