title: Getting "A page can have only one server-side Form tag" error, not using a master page
body: <p>So I'm the new guy on the dev team, trying to update a "Dashboard" type page, which is the default landing page for our users. The default.aspx page consists of 16 Web User Controls (.ascx). I've been asked to add stock "widget" on the dashboard, so users can monitor our company's stock symbol. To allow for different timeframes (1 day, 5 day, 3 month, etc) I was planning on using a Menu (tabs) within a new .ascx. When I try to use a menu, I get the error "<strong>Control 'StockDisplay_StockMenu' of type 'Menu' must be placed inside a form tag with runat=server</strong>". If I wrap the menu in form tags, I get the <strong>"A page can have only one server-side Form tag</strong>" error.</p>
  
  <p>Most search results suggest looking at the Master Page, but we're not using one here. I checked The default.aspx page, and it does not have any form tags. Other searches suggested removing &lt; head> and &lt; body> tags in the .ascx, which I've done, but still I have the issue.</p>
  
  <p>Here's my stripped down code, which still produces the error:</p>
  
  <pre><code>&lt;%@ Control Language="VB" AutoEventWireup="false" CodeFile="UC_StockDisplay.ascx.vb" Inherits="UC_StockDisplay" %&gt;
  &lt;%@ Import Namespace="System.Data" %&gt;
  
  &lt;form id="Form1" runat="server"&gt;
      &lt;asp:Menu ID="StockMenu" runat="server"&gt;
          &lt;Items&gt;
              &lt;asp:MenuItem Text="One Day" /&gt;
              &lt;asp:MenuItem Text="Five Days" /&gt;
              &lt;asp:MenuItem Text="Three Months" /&gt;
              &lt;asp:MenuItem Text="Six Months" /&gt;
              &lt;asp:MenuItem Text="One Year" /&gt;
          &lt;/Items&gt;
       &lt;/asp:Menu&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here's the default.aspx:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %&gt;
  
  &lt;%@ Register src="UC_HelpUs.ascx" tagname="HelpUs" tagprefix="uc1" %&gt;
  &lt;%@ Register src="UC_ImportantNumbers.ascx" tagname="ImportantNumbers" tagprefix="uc2" %&gt;
  &lt;%@ Register src="UC_ImportantLinks.ascx" tagname="ImportantLinks" tagprefix="uc3" %&gt;
  &lt;%@ Register src="UC_Printers.ascx" tagname="Printers" tagprefix="uc4" %&gt;
  &lt;%@ Register src="UC_WorkOrder.ascx" tagname="WorkOrder" tagprefix="uc5" %&gt;
  &lt;%@ Register src="UC_RequestForms.ascx" tagname="UCRequestForms" tagprefix="uc6" %&gt;
  &lt;%@ Register src="UC_MiscLinks.ascx" tagname="MiscLinks" tagprefix="uc7" %&gt;
  &lt;%@ Register src="UC_Emergency.ascx" tagname="Emergency" tagprefix="uc8" %&gt;
  &lt;%@ Register src="UC_Floorplan.ascx" tagname="Floorplan" tagprefix="uc9" %&gt;
  &lt;%@ Register src="UC_Directory.ascx" tagname="Directory" tagprefix="uc10" %&gt;
  &lt;%@ Register src="UC_Weather.ascx" tagname="Weather" tagprefix="uc11" %&gt;
  &lt;%@ Register src="UC_Holiday.ascx" tagname="Holiday" tagprefix="uc12" %&gt;
  &lt;%@ Register src="UC_CoreValues.ascx" tagname="CoreValues" tagprefix="uc14" %&gt;
  &lt;%@ Register src="UC_MyInfo.ascx" tagname="MyInfo" tagprefix="uc15" %&gt;
  &lt;%@ Register src="UC_Travel.ascx" tagname="Travel" tagprefix="uc16" %&gt;
  &lt;%@ Register src="UC_StockDisplay.ascx" tagname="StockDisplay" tagprefix="uc17" %&gt;
  
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;IT Helpdesk&lt;/title&gt;
  &lt;/head&gt;
  &lt;body style="background-color:#1B5B9D;"&gt;
  
      &lt;center&gt;
      &lt;a href="/"&gt;&lt;img src="images\banner2.gif" border=0&gt;&lt;/a&gt;&lt;br&gt;
      &lt;font face="Courier New Bold" size=5 color=white&gt;Helpdesk 3.5&lt;/font&gt;&lt;br&gt;
      &lt;table width=100% cellspacing=10&gt;
          &lt;tr&gt;
              &lt;td width="33%" valign=top&gt;
                  &lt;uc1:HelpUs ID="HelpUs" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc3:ImportantLinks ID="ImportantLinks" runat="server" /&gt;
                  &lt;br&gt;                
                  &lt;uc10:Directory ID="Directory" runat="server" /&gt;
                  &lt;br&gt;            
                  &lt;uc6:UCRequestForms ID="UCRequestForms" runat="server"/&gt;
                  &lt;br&gt;
                  &lt;uc7:MiscLinks ID="MiscLinks" runat="server" /&gt;
              &lt;/td&gt;
              &lt;td width="33%" valign=top align=center&gt;
                  &lt;uc5:WorkOrder ID="WorkOrder" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc8:Emergency ID="Emergency" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc2:ImportantNumbers ID="ImportantNumbers" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc11:Weather ID="Weather" runat="server" /&gt;
  
      &lt;td width="33%" valign=top&gt;
                  &lt;uc17:StockDisplay ID="StockDisplay" runat="server" /&gt;
                  &lt;br /&gt;
                  &lt;uc9:Floorplan ID="Floorplan" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc4:Printers ID="Printers" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc15:MyInfo ID="MyInfo" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc14:CoreValues ID="CoreValues" runat="server" /&gt;
                  &lt;br&gt;
                  &lt;uc12:Holiday ID="Holiday" runat="server" /&gt;
                  &lt;br /&gt;
                  &lt;uc16:Travel ID="Travel" runat="server"&gt;&lt;/uc16:Travel&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/center&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>