Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Dynamic controls in composite control

Reply
Thread Tools

Dynamic controls in composite control

 
 
Marty
Guest
Posts: n/a
 
      10-04-2005
I am writing a composite control that has a public method which allows
the addition of more web controls to the custom controls child control
collection. How can I access the value of those new controls within the
code behind file. See example below:

I perform this in the OnInit method. This is a public method with
additional functionality but the concept is add a new controlt to the
composite control.
mycontrol.Add("ControlName", "ControlValue", new TextBox());

However, I cannot access this new control in the designer like:
ControlName.Text because the control is not part of the pages control
collection.

I am not implementing the INamingContainer Interface due to the need to
name each control as it is added.

This is actually doing much more layout and UI layout but the concept
remains the same.

Any pointers how I can access dynamically added controls to a composite
control?

Thanks
Marty


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Dynamic Composite Controls And Their Child Control Collection Harry ASP .Net 2 04-16-2004 07:15 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments