HighTechTalks DotNet Forums  

Re: Problem adding composite controls programatically

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Re: Problem adding composite controls programatically in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Saunders
 
Posts: n/a

Default Re: Problem adding composite controls programatically - 09-19-2003 , 04:36 PM






"Stephen Richardson" <steve (AT) richson64 (DOT) freeserve.co.uk> wrote

Quote:
I have built a composite control that contains an
asp.CheckBox control. If I add the control to a web form
at design time everything works OK. BUT if I add the
control at runtime using the code this.controls.add
(mycompositecontrol) in the page_load event of a web form
I get an error message. "Control of type 'CheckBox' must
be placed inside a form tag with runat=server". How can I
add my control programatically without getting this alarm?
(I have to add my controls using code because I don't know
how many I need).
Add a Placeholder control to your web page and add the composite control to
that.
--
John Saunders
Internet Engineer
john.saunders (AT) surfcontrol (DOT) com




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.