# C1.Win.InputPanel.InputHtmlLabel.LinkClicked

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_Win_InputPanel_InputHtmlLabel_LinkClicked" data-uid="C1.Win.InputPanel.InputHtmlLabel.LinkClicked" class="text-break">LinkClicked Event
</h1>
<div class="markdown level0 summary"><p>Event that fires when the user clicks a hyperlink within an <a class="xref" href="C1.Win.InputPanel.InputHtmlLabel.html">InputHtmlLabel</a> component.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.InputPanel.html">C1.Win.InputPanel</a></h6>
<h6><strong>Assembly</strong>: C1.Win.InputPanel.10.dll</h6>
<h5 id="C1_Win_InputPanel_InputHtmlLabel_LinkClicked_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event LinkClickedEventHandler LinkClicked</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Event LinkClicked As LinkClickedEventHandler</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.InputPanel.LinkClickedEventHandler.html">LinkClickedEventHandler</a></td>
      <td>Event that fires when the user clicks a hyperlink within an  component.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_InputPanel_InputHtmlLabel_LinkClicked_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>Hyperlinks are created using &quot;A&quot; tags in the HTML source text. When hyperlinks are clicked,
the <b>LinkClicked</b> event fires and provides information about the link. The event handler
can then take appropriate action.</p>
</div>
<h5 id="C1_Win_InputPanel_InputHtmlLabel_LinkClicked_examples"><strong>Examples</strong></h5>
<p>The example below creates some hyperlinks using &quot;A&quot; tags. When the user clicks the link, the
event handler shows a message box.</p>
<pre><code class="lang-csharp">// configure InputHtmlLabel
inputHtmlLabel1.Text =
    "click &lt;a href='about'&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/a&gt; to see an about box.&lt;br&gt;" +
    "or click &lt;a href='time'&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/a&gt; to see the current time.";

// attach event handler
inputHtmlLabel1.LinkClicked += new LinkClickedEventHandler(inputHtmlLabel1_LinkClicked);
// ...

void inputHtmlLabel1_LinkClicked(object sender, LinkClickedEventArgs e)
{
  if (e.Button == MouseButtons.Left)
  {
    if (e.HRef == "about")
    {
      MessageBox.Show("About clicked!");
    }
    else if (e.HRef == "time")
    {
      MessageBox.Show("The time is " + DateTime.Now.ToShortTimeString());
    }
  }
}</code></pre>

</div>
