sure,
you can do something like this :
foreach(Control ChildControl in pnlDocument.Controls[0].Controls) //get
child controls of a objcet , this can be page itself
{
if (ChildControl.GetType()==typeof(Controls.ErsinCont ent)) // check the
type of the object if this is one of your objects
{
Controls.ErsinContent
Content=(ErsinPortal.Controls.ErsinContent)ChildCo ntrol; //cast object as
your object
Content.Content=ContentRow.Content; //change properties
}
}
}
"Asha" <As**@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
hello, i got many asp.net controls and i want to put the same values into
all of the contorls. is there a better coding habit to allow me to loop
through all these contorls with different id to have the same attribute. e.g css
class name or height or enable/disable it. thanks