TARGET Attribute | Target Property

Sets or retrieves a value that indicates the window or frame at which to target the contents.

Syntax

ASP <tagPrefix:ELEMENT TARGET = sTarget ... >
Script [ sTarget = ] object.Target

Possible Values

tagPrefix Required. The element prefix associated with the WebControls namespace (Microsoft.Web.UI.WebControls). A TagPrefix is defined using the directive.
sTarget System.String that specifies or receives one of the following values:
nameThe name of the target window or FRAME.
_blankLoads the linked document into a new blank window. This window is not named.
_parentLoads the linked document into the immediate parent of the document that contains the link.
_searchLoads the linked document into the browser search pane. Available in Microsoft Internet Explorer 5 and later.
_selfDefault. Loads the linked document into the same window in which the link was clicked (the active window).
_topLoads the linked document into the topmost window.

The property is read/write. The property has a default value of _self.

Remarks

If there is no existing window or frame with the same name that is specified in the Target, a new window is opened with a name equal to the value of the Target.

Example

This example uses the TARGET attribute to specify a link that loads the page into the topmost frame of the current frameset.


<TREENODE TEXT="Go to New Page." NAVIGATEURL="newpage.htm" TARGET="_top"/>
                    

Applies To

TreeBase, TREENODE, TREENODETYPE, TREEVIEW

See Also

Internet Explorer WebControls, About the TreeView WebControl