|
-
November 4th, 2002, 07:45 PM
#1
What is the best way to examine nested controls.
I have several web server controls that are nested inside a datalist control. What is the best way to programmatically access those controls and their properties?
-
November 9th, 2002, 07:32 AM
#2
Re: What is the best way to examine nested controls.
Originally posted by sager
I have several web server controls that are nested inside a datalist control. What is the best way to programmatically access those controls and their properties?
In C#, you can do this to reiterate over the list of controls:
Code:
foreach (Control c in myDataList.Controls)
{
Reponse.Write(c.ToString());
}
That will display the type of evey child control to the datalist. If you're looking for a certain control, you can search for it by type.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|