Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding a Control by Name
Message
De
06/09/2007 08:00:51
 
 
À
05/09/2007 23:00:19
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01252529
Message ID:
01252679
Vues:
24
Hey Bonnie,

Hmm, somehow I overlooked this or misinterpreted it. Silly me. I'll take a look at it, thanks.

>Hi Bill,
>
>The Controls collection has a Find method that looks like it might do the trick, but I haven't actually tried it. I think it would probably be used like this:
>
>
>this.Controls.Find("MyControl", true);
>
>The second parameter is for SearchAllChildren.
>
>~~Bonnie
>
>
>>If a control is nested within other controls on a Windows form and the control Name is known, is it possible to get a reference to the control without doing a recursive search of the control array? Recursively searching the control array is the only method I have been able to find for this. Although this works, I would prefer a more direct approach if one exists.
>>
>>Thanks,
>>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform