Add form runat=server tags in Composite Control

D

DC

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
 
D

DC

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top