Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Add form runat=server tags in Composite Control

Reply
Thread Tools

Add form runat=server tags in Composite Control

 
 
DC
Guest
Posts: n/a
 
      12-13-2005
Hi,

I am using a Composite Control that encloses two Usercontrols. Both
Usercontrols require to be enclosed in a <form runat=server> tag.

I would like to add this tag within the Composite control (I cannot add
the form tag in the aspx page or elsewhere).

Question: how do I correctly render out the form tag? I tried adding
the form tag in CreateChildControls() (where I also add the
usercontrols to the composit control) but failed.

TIA for any hint,

Regards
DC

 
Reply With Quote
 
 
 
 
Jesús López
Guest
Posts: n/a
 
      12-13-2005
I think you should inherit your composite web control from HtmlForm.

"DC" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed) ups.com...
> Hi,
>
> I am using a Composite Control that encloses two Usercontrols. Both
> Usercontrols require to be enclosed in a <form runat=server> tag.
>
> I would like to add this tag within the Composite control (I cannot add
> the form tag in the aspx page or elsewhere).
>
> Question: how do I correctly render out the form tag? I tried adding
> the form tag in CreateChildControls() (where I also add the
> usercontrols to the composit control) but failed.
>
> TIA for any hint,
>
> Regards
> DC
>



 
Reply With Quote
 
 
 
 
DC
Guest
Posts: n/a
 
      12-14-2005
Thanks, I only need to add the UserControls to the control enumeration
of the HtmlForm:

Control myForm = new HtmlForm();
Controls.Add(myForm);
[...]
myForm.Controls.Add(myUserControl);

Regards
DC

 
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
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net 0 07-01-2003 09:26 PM



Advertisments