Every ASP.Net Control has a collection of Controls called "Controls." You
can loop through that collection of a Control to find all the Controls
contained in it. To identify Labels in that Collection you would use
Reflection. The tricky part is that I don't know whether all of your labels
are contained within the same Controls Collection. For example, you would
typically start at the WebForm level (the WebForm is the <form> element in
the Page). Most ASP.Net Controls must reside within an HtmlForm Control in
order to work. However, looping thtough tyhe Controls Collection of the Form
may not reveal all of your labels. For example, if a label is inside another
Control in the Form, it is a member of the Controls Collection of the nested
Control, not the Form. You could write a recursive function to loop through
all of the Controls in a Control, and then call itself to loop through all
the Controls of each Child (etc) to find all of them.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.