Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loop through controls
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Loop through controls
Divers
Thread ID:
01331607
Message ID:
01331607
Vues:
51
Hi All,

I am trying to loop through all the controls on my ASP.NET page. Instead the following code returns all the controls on the Master Page. How do I reference the actual ASP.NET forms and not the Master Page?
For Each myControl As Control In Page.Form.Controls
            If TypeOf myControl Is TextBox Then
                If InStr(myControl.ID, "unboxlength") Then
                    CType(myControl, TextBox).Text = "This one"
                End If

            End If
        Next myControl
Thank you,
Daniel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform