In VB6 you could iterate through the controls on a form, by doing
something like this: 

    Dim ctl as Control 

    For Each ctl in Controls 
      If Typeof Ctl is TextBox then 
         'do something 
      End If 
    Next 
 
It looks to me as though doing something like the following in VB.NET
works, for iterating through the controls:
 
  Dim ctl as Control
 
  For Each ctl in Me.Controls
      'a test
  Next
 
works, however I do NOT know what do use, for the test condition of a
control.  (In this case, Web Server controls.)  How do I determine
whether or not any given control on the web form is something like a
label (System.Web.UI.WebControls.Label) or something like that?

 
Rod Falanga
 <http://amci.unm.edu/> http://amci.unm.edu/
 

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to