I have a few scattered <p>
elements on the aspx page which I am grouping together using a class like so - <p class="instructions" runat="server">
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?
EDIT: I can't use JavaScript, so the selection must be done in C# codebehind/ASP.NET
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…