Custom link |
Top Previous Next |
Using this type of link you can define own reaction to the clicking of the mouse. For this, use the "Click" event handler of the object. To do this:
In the handler's code, do everything what you need. You, most likely, will need a link to the object, which the handler calls, and a hyperlink's value. Use the handler's parameter sender:
private void Text2_Click(object sender, EventArgs e) { // sender - this is the object which was clicked. // In order to receive the value of the hyperlink, you need // to cast the sender to ReportComponentBase type. object hyperlinkValue = (sender as ReportComponentBase).Hyperlink.Value;
MessageBox.Show("Hyperlink value = " + hyperlinkValue.ToString()); }
|