How to select an element by Class instead of ID in ASP.NET?

Posted by firedrawndagger on Stack Overflow See other posts from Stack Overflow or by firedrawndagger
Published on 2010-05-04T14:57:18Z Indexed on 2010/05/04 14:58 UTC
Read the original article Hit count: 313

Filed under:
|
|
|
|

I have a few scatter

elements which I am grouping together using a class like so - . In my code behind, using C# I want to hide these elements, using something like instructions.Visible = false;. 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...

Alternatively is there another way to group the controls if not by class?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#