Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Controls

Reply
Thread Tools

Controls

 
 
Viorel Ghilas
Guest
Posts: n/a
 
      06-26-2003
Hi all

I make a control and put it on the form. My control search on the page
something and if it doesn't found must add one control on the form. I try
myCotnrol.Page.Controls.Add(c) and I get error "A control cannot modify its
parents' control collections.". How can I add a control to form from my
control?

with best regard
Viorel Ghilas


 
Reply With Quote
 
 
 
 
noname
Guest
Posts: n/a
 
      06-26-2003
http://samples.gotdotnet.com/quickst...bpagelets.aspx

go to the bottom of the page. there's a section on how to add controls at
runtime. i'm a newbie, though, and not sure if this is what you need.

"Viorel Ghilas" <(E-Mail Removed)> wrote in message
news:OBox2d$(E-Mail Removed)...
> Hi all
>
> I make a control and put it on the form. My control search on the page
> something and if it doesn't found must add one control on the form. I try
> myCotnrol.Page.Controls.Add(c) and I get error "A control cannot modify

its
> parents' control collections.". How can I add a control to form from my
> control?
>
> with best regard
> Viorel Ghilas
>
>



 
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
Controls.Count, Controls.IsSynchronized, and Controls.SyncRoot Nathan Sokalski ASP .Net 4 09-05-2007 03:27 AM
IntelliSense on Web User Controls and Web Custom Controls Axel Dahmen ASP .Net 1 11-12-2003 06:12 AM
Multiple controls with the same ID '_ctl24' were found. Trace requires that controls have unique IDs Jeff Tolman ASP .Net 0 11-04-2003 09:53 PM
How to force the child controls OnClick event before the parent controls CreateChildControls method? Arulraja ASP .Net 3 10-17-2003 04:22 PM
HTML Controls and User controls trinitypete ASP .Net 6 06-26-2003 09:47 AM



Advertisments