System.Windows.Forms.LinkLabel.LinkClicked Event

Occurs when a link is clicked within the control.

Syntax

public event LinkLabelLinkClickedEventHandler LinkClicked

Remarks

Typically, the LinkLabel.LinkClicked event is handled to perform tasks when the user clicks on a link in the control. The event handler for the LinkLabel.LinkClicked event is passed an instance of the System.Windows.Forms.LinkLabelLinkClickedEventArgs class that contains a System.Windows.Forms.LinkLabel.Link object that is associated with the link that was clicked. You can use information specified in the System.Windows.Forms.LinkLabel.Link.LinkData property of System.Windows.Forms.LinkLabel.Link class to determine which link was clicked or what type of task to perform when the link is clicked. For example, if a System.Windows.Forms.LinkLabel control has a System.Windows.Forms.LinkLabel.Link object defined with its System.Windows.Forms.LinkLabel.Link.LinkData property set to the string www.microsoft.com, you can use this information in an event handler for the LinkLabel.LinkClicked event to display the Web site.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0