I'm trying to dynamically set the Visible
property of multiple boxes, panels, buttons etc. from my codebehind for an aspx page. I was wondering if there is a way to group server controls into some logical group so that you could do something like this pseudo-code:
foreach(c in controlgroup) {
c.Visible = value
}
The reason being is that the page displays different kinds of options depending on an ID parameter in the URL. I have seen this question but I'm wondering if there's another way to do it than by using user controls?
Edit: It would be nice if I could set the group on the aspx page rather than having to still add each control manually..