Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a Control by Name
Message
From
09/09/2007 07:18:32
 
 
To
09/09/2007 00:22:31
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01252529
Message ID:
01253280
Views:
16
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform