Newbie: Loop through WebControls on a form - C#

C

Calvin KD

I've got a user control with a series of WebControl Buttons, rendered as tabs
(for WebForms). I'd like to loop through these buttons / tabs to set their
properties. I've used the foreach (Control objTab in this.Controls) construct
but it gave me an error "The type or namespace name 'Control' could not be
found ..." even though I've got the "using System.Web.UI.WebControls"
statement at the top of the page.
Have I done something wrong or is there some other ways of doing it? Can
someone enlighten me on this please.
Any suggestion is greatly appreciated.
Many thanks in advance.
KD
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top