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.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

BurntSkyConnect With a Mentor Commented:
You can't have more than one Form in ASP.NET applications (one of the many changes from ASP 3).  But this doesn't mean you can't do what you're asking.

Attach an event handler to your "search" and "login" button's click events.

private void Page_Load(object sender, System.EventArgs e)
      this.btnSearch.Click += new EventHandler(btnSearch_Click);
      this.btnLogin.Click += new EventHandler(btnLogin_Click);

private void btnSearch_Click(object sender, EventArgs e)
      // Code to handle search here

private void btnLogin_Click(object sender, EventArgs e)
      // Code to handle login here
EnnioAuthor Commented:
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:
All Courses

From novice to tech pro — start learning today.