title: How to select an element by Class instead of ID in ASP.NET?
body: <p>I have a few scattered <code>&lt;p&gt;</code> elements on the aspx page which I am grouping together using a class like so - <code>&lt;p class="instructions" runat="server"&gt;</code></p>
  
  <p>In my code behind, using C# I want to hide these elements, using something like 
  <code>instructions.Visible = false;</code></p>
  
  <p>However I realize I can only do this in codebehind if I use ID but this will result in invalid HTML/CSS Selector since you can't have multiple ID's with the same ID name...</p>
  
  <p>Alternatively is there another way to group the controls if not by class?</p>
  
  <p>EDIT: I can't use JavaScript, so the selection must be done in C# codebehind/ASP.NET</p>