Iterate through Panels

F

Fabian

In my ASP.NET page I create panel controls dynamically. Now, I will loop
through all my dynamically created panels.

How I can do this?



Thanks for help

Fabian
 
G

Guest

Panels are added to the control collection of the page. As such, the only way
I know is to loop through controls and using GetType() to figure if it is a
Panel object.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
M

Matt Berther

Hello Cowboy (Gregory A. Beamer) - MVP,

How about

foreach (Panel p in this.Controls)
{
// do something
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top