ASP.NET HyperLink TargetProperties


HyperLink 控件HyperLink Control

Definition and Usage

The Target property is used to set or return the target of the HyperLink control.

Syntax

<asp:HyperLink Target="target" runat="server" />
 
Property Description
target Where to open the target URL.
  • _blank - Opens the target URL in a new window
  • _self - Opens the target URL in the same frame as it was clicked
  • _parent - Opens the target URL in the parent frameset
  • _top - Opens the target URL in the full body of the window


Example

The following example sets the Target property on a HyperLink control:

<form runat="server">
<asp:HyperLink id="link1" runat="server" Text="EXAMPLE"
NavigateUrl="http://www.example.com" Target="_blank" />
</form>

Show example »

HyperLink 控件HyperLink Control Other Extensions