"Poppy" <pa**********@NOSPAMthemedialounge.com> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
How can I loop through controls on a form and find out what type they are.
I want to loop through controls on a webform and if they are visible
textboxes change there value if NULL to "na".
Also
If I placed this code in a module or class how would the code know which
page I was refering to.
This is a VB Lanugage group, not WebForms/ASP. In VB, you could do it like
this:
Dim c as Windows.Forms.Control
For Each c In Me.Controls
If TypeOf c Is TextBox Then
'// Do something
End If
Next
But I'm sure that doesn't help you much, I would try asking your question in
the ASP.NET group:
microsoft.public.dotnet.framework.aspnet
HTH,
Jeremy