User Controls and <form runat="server">

  • Thread starter Thread starter Hai Nguyen
  • Start date Start date
H

Hai Nguyen

Hi all

I have a several User Controls which require this tag: "<form
runat="server">. I tried to have all of these user user controls on the same
web page. It kept giving me an error :""A page can have only one server-side
Form tag"

Is there a way to go around this?


Thanks
 
Hai,

Your user control should not have a form tag which relies on being run
on the server. Rather, you should depend on the fact that your control will
be declared in a container, which ultimately is contained in a form tag run
on the server.

Hope this helps.
 

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

Back
Top