In response to my question below I believe something like this will work:
StringBuffer sb = new StringBuffer();
ControlCollection cc = this.get_Controls();
Control c = cc.get_Item(1);
ControlCollection ccc = c.get_Controls();
for (int i=0; i<ccc.get_Count(); i++)
{ if (ccc.get_Item(i).get_ID() != null)
sb.append(ccc.get_Item(i).get_ID() + ",");
}
System.out.println(sb.toString());
[quoted text, click to view] "GH" wrote:
> I'm pretty new to .net and I'm hoping someone can help me. I have an asp
> page that contains many webcontrols objects, for example WebControls.TextBox
>
> Is there a way for me to get a "collection" of webcontrols object that are
> contained on a page? I'd like to be able to loop thru the collection and
> examine properties of the control objects as I encounter them. Getting each
> control by name is not really an option for me unless there is a way to get
> the list of names.
>
Please remember this will only list the controls that are on the first
panel. If you have multiple panels on top of each other, or controls on
controls, you must do a recusive search through the controls (yes, you can
also do a iterative search).
Do you know how to do this, or do you want an example?
Regards,
Lars-Inge Tønnessen