473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Problem enumerating Controls

Hi. I need to iterate through the Page controls collection in order tu
enumerate every control on it. I though this was enough as I read from
4guysfromrolla:

void Page_Load(Object sender, EventArgs e)
{
foreach(Control c in Controls)
lblControlList.Text += c.ToString() + " - " + c.ID + "<br>";
}

but the problem is that not every control is listed, I have 4 Panels that
are not shown , as well as a Label and some other controls.
This is the page: http://www.aspenate.com/interests.aspx

Please need help!
Nov 19 '05 #1
1 1036
After 2 hours and thanks to an article at 4guysfromrolla I learned that the
controls has different parents so recursion is necessary. Also found another
answer regarding ResourceBasedLiteralControl. The article:
http://aspnet.4guysfromrolla.com/art...81402-1.2.aspx

Thanks 4guysfromrolla .

"Alejandro Penate-Diaz" <al*******@apenate.com> wrote in message
news:e6**************@TK2MSFTNGP14.phx.gbl...
Hi. I need to iterate through the Page controls collection in order tu
enumerate every control on it. I though this was enough as I read from
4guysfromrolla:

void Page_Load(Object sender, EventArgs e)
{
foreach(Control c in Controls)
lblControlList.Text += c.ToString() + " - " + c.ID + "<br>";
}

but the problem is that not every control is listed, I have 4 Panels that
are not shown , as well as a Label and some other controls.
This is the page: http://www.aspenate.com/interests.aspx

Please need help!

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Yasutaka Ito | last post by:
Hi, As you know, all the non-ui components (like Timer control, etc.) that sit on the form are contained in its private variable 'components'. How can I enumerate such components from any form...
0
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
2
by: Bishman | last post by:
Can anyone suggest a method of enumerating instances of MSDE 2000 without using DMO ? Using C++, MFC, and ADO. Thanks
2
by: Julius Mong | last post by:
Dear all, I'm trying to search for "width" and "height" in the root node in an SVG doc and remove them accordingly, what I don't understand is if I did the following code, it'll only remove...
4
by: Lyn | last post by:
Hi, This question may seem a bit academic... To learn more about Access VBA, I have been enumerating the properties of various form controls. This was mostly successful and I have learned a lot...
1
by: Kevin | last post by:
Hi, How can I enumerate a linked list while being hable to delete any number of elements while enumerating ? I was using: struct st { ... struct st *prev;
11
by: 2D Rick | last post by:
I want to do a quick check of a group of textboxes only to see if they contain anything. I tried this code but it appears to go from box to box based on the boxes time of creation. Is it...
2
by: Tony | last post by:
I have this problem - I have a hashtable, containing a list of filenames. Every 60 seconds, I have a thread that enumerates thru this hashtable, and based on some simple logic, some of the items...
3
by: | last post by:
Hi all, I have an asp.net 2.0 web app that has an aspx page that has a Master page. The Master page has the <form runat="server"defined on it. Now the aspx page has a UserControl that has a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.