title: Find element by attribute in aspx
body: <pre><code>&lt;div id="foo" runat="server" data-id="bar"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>In the code behind, this div can be accessed either directly on the id or using <code>FindControl()</code>.</p>
  
  <p>But is there any way to search for elements on an aspx based on another attribute than id? Like <code>data-id="bar"</code> above for example.</p>