title: ASP.NET global selector for types of element
body: <p>I have several button elements that I wish to set as <code>visible = false</code> when a certain condition is met.</p>
  
  <p>I have a method to do this, within which I define a list and add the required button elements. I then loop through the list and hide all these elements:</p>
  
  <pre><code> Sub restrictEditAccess()
          Dim editButtons As New List(Of Control)()
  
          editButtons.Add(button1)
          editButtons.Add(button2)
          ...
          editButtons.Add(button9)
  
          For Each button In editButtons
              button.Visible = False
          Next
      End Sub
  </code></pre>
  
  <p>Is there a way in VB to do a jQuery style selector (specifically on the back-end) in order to reduce the vb code e.g.:</p>
  
  <pre><code>elementsWithHTMLAttribute.Attribute("data-editAccess").visible = false
  </code></pre>