Need help with LoadControl

K

Kurt

When I try to use LoadControl I get the error message below. Any help would
be great.

Kurt

Control '_ctl0_Classification' of type 'TextBox' must be placed inside a
form tag with runat=server
 
N

Naveen K Kohli

Any control that can cause PostBAck should be placed within <form> tags...

<form
... All PostBack controls go here.
</form>
 
N

Natty Gur

Hi,
To be more accurate. All "web forms" controls must be under Form tag
with runat=server attribute. this attribute guarantee the postback
behavior.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
N

Natty Gur

this.FindControl("FormName").Controls.Add(MyControl);

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top