title: Get asp:Hyperlink data-attribute through onclick event
body: <p>I have a asp:Hyperlink with a data-attribute containing a value (a number in this case).</p>
  
  <pre><code>&lt;asp:HyperLink ID="hypTest" href="testwebsite.com" CssClass="button-close" data-test="1" runat="server" Text="Testlink" onclick="dosomething"&gt;&lt;/asp:HyperLink&gt;
  </code></pre>
  
  <p>How can I access the data attribute from this HyperLink in the codebehind when a user clicks that exact link. (there will be multiple similar links)      </p>
  
  <p>Also note that the onclick shown above does not work for me.<br>
  It does not access the dosomething method.</p>
  
  <pre><code>protected void dosomething()
  {
      //get the data-test value
  }
  </code></pre>
  
  <p>What would be the best way to achieve this?</p>
  
  <p>Thanks in advance.</p>