The event handler receives an argument of type LinkClickedEventArgs containing data related to this event. The following LinkClickedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Button | Gets the button that was clicked on the link. |
HRef | Gets the value of the link's HREF attribute. |
Location | Get the location of the mouse during the generating event. |
Target | Gets the value of the link's TARGET attribute. |
X | Get the x-coordinate of the mouse during the generating event. |
Y | Get the y-coordinate of the mouse during the generating event. |
Hyperlinks are created using "A" tags in the HTML source text. When hyperlinks are clicked, the LinkClicked event fires and provides information about the link. The event handler can then take appropriate action.
The example below creates some hyperlinks using "A" tags. When the user clicks the link, the event handler shows a message box.