Link to home
Start Free TrialLog in
Avatar of Ennio
Ennio

asked on

Multi form in one page

I would like to know how can I add more then 1 form on the same page. I need to have a quick search, and a login form.
but when I add both, I get an error saying that I cannot have more then one form.
ASKER CERTIFIED SOLUTION
Avatar of BurntSky
BurntSky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ennio
Ennio

ASKER

Ok, and I should have both my search and my login inside the same <form>??
Yes.  In ASP.NET applications all web controls must be contained within a single <form /> tag.  Be sure the tag contains the runat=server attribute.  It should look like this:

<form id="Form1" method="post" runat="server"></form>

If you're new to ASP.NET here's a couple resources you should check out:

http://aspnet.4guysfromrolla.com/
http://www.asp.net/Tutorials/quickstart.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/html/cpsmpASPNETQuickStart.asp
http://msdn.microsoft.com/asp.net/gettingstarted/