PC Review


Reply
Thread Tools Rate Thread

How to add controls to Controls.Collection?

 
 
shapper
Guest
Posts: n/a
 
      5th Jun 2007
Hello,

I have an array of controls:
Dim MyControls() As Control
....

How can I add all the controls in MyControls array to a control
collection?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
Riki
Guest
Posts: n/a
 
      5th Jun 2007
In VB.NET:

For i As Integer = 0 To MyControls.Length-1
myControlCollection.Add(MyControls(i))
Next

Riki

"shapper" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have an array of controls:
> Dim MyControls() As Control
> ...
>
> How can I add all the controls in MyControls array to a control
> collection?
>
> Thanks,
> Miguel
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.Controls.Add(Control) Does Not Add Control to child collection (this.Controls.Count == 0) Chad Scharf Microsoft ASP .NET 3 18th Oct 2007 04:53 PM
getting controls from the placeholder controls collection msnews.microsoft.com Microsoft ASP .NET 1 26th Sep 2004 12:19 AM
Adding controls to Page.Controls collection Jeremy Ames Microsoft ASP .NET 5 5th Mar 2004 08:33 PM
Adding controls to Page.Controls collection Jeremy Ames Microsoft C# .NET 0 3rd Mar 2004 04:53 PM
How to step through the controls in a webform controls collection Dave Adler Microsoft VB .NET 1 17th Feb 2004 11:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:39 PM.