Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding a Control by Name
Message
De
09/09/2007 07:18:32
 
 
À
09/09/2007 00:22:31
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01252529
Message ID:
01253280
Vues:
15
Yes, I also got it to work. Somehow I just overlooked it. Live and learn.

Bill

>You're welcome, Bill.
>
>Sometime after posting my reply, I thought I should probably get around to trying it ... I did and it works as expected.
>
>~~Bonnie
>
>
>
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform