Solved

A page can have only one server-side Form tag.

Posted on 2004-09-05
4
641 Views
Last Modified: 2013-12-16
How else can I call two forms from one aspx page? I wasn't aware of this limitation, here is the full error:

 A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.

Here are my tags

<html>

      <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <meta name="generator" content="Adobe GoLive">
            <title>Untitled Page</title>
      <style type="text/css">
<!--
body {
      background-color: #FFFFFF;
}
.style2 {font-size: 9px}
-->
    </style>
      </head>
<body>
             <p align="center"><img src="e2.jpg" width="694" height="209"></p>
             <p align="center">&nbsp;</p>
             <form runat="server">
                 <p align="center">                
                 <div align="center">
  <asp:DropDownList id="category" runat="server">
        <asp:ListItem Text="Category"/>    
         <asp:ListItem Text="Arneis"/>      
           <asp:ListItem Text="Barbera"/>      
           <asp:ListItem Text="Bordeaux"/>      
           <asp:ListItem Text="Cabernet Sauvignon"/>      
           <asp:ListItem Text="Chardonnay"/>      
           <asp:ListItem Text="Coastal South Africa"/>      
           <asp:ListItem Text="Colchagua"/>      
           <asp:ListItem Text="Corvina"/>      
           <asp:ListItem Text="Fortified Blend"/>      
           <asp:ListItem Text="Fume Blanc"/>      
           <asp:ListItem Text="Gamay"/>      
           <asp:ListItem Text="Greco"/>      
           <asp:ListItem Text="Malbec"/>      
           <asp:ListItem Text="Marsanne"/>      
           <asp:ListItem Text="Merlot"/>      
           <asp:ListItem Text="Montepulciano"/>      
           <asp:ListItem Text="Moscato"/>      
           <asp:ListItem Text="Muscadet"/>      
           <asp:ListItem Text="Nebbiolo"/>      
           <asp:ListItem Text="Pauillac"/>      
           <asp:ListItem Text="Pinot Blanc"/>      
           <asp:ListItem Text="Pinot Bianco"/>    
           <asp:ListItem Text="Pinot Grigio"/>    
           <asp:ListItem Text="Pinot Gris"/>    
           <asp:ListItem Text="Pinot Noir"/>    
           <asp:ListItem Text="Primitivo "/>    
           <asp:ListItem Text="Red Blend"/>    
           <asp:ListItem Text="Rhone Valley"/>    
           <asp:ListItem Text="Riesling "/>    
           <asp:ListItem Text="Rose Blend "/>    
           <asp:ListItem Text="Sake"/>    
           <asp:ListItem Text="Sangiovese"/>    
           <asp:ListItem Text="Sauvignon Blanc"/>    
           <asp:ListItem Text="Semillon "/>    
           <asp:ListItem Text="Shiraz"/>    
           <asp:ListItem Text="Sparkling Blend "/>    
           <asp:ListItem Text="Sweet Blend"/>    
           <asp:ListItem Text="Syrah"/>    
           <asp:ListItem Text="Tempranillo"/>    
           <asp:ListItem Text="White"/>    
           <asp:ListItem Text="White Blend"/>    
           <asp:ListItem Text="Viognier"/>    
           <asp:ListItem Text="Zinfandel"/>    
  </asp:DropDownList>
  <asp:DropDownList id="region" runat="server">
        <asp:ListItem Text="Region"/>    
          <asp:ListItem Text="Abruzzi"/>    
          <asp:ListItem Text="Alsace"/>    
          <asp:ListItem Text="Andalucia"/>    
          <asp:ListItem Text="Bordeaux"/>    
          <asp:ListItem Text="Burgundy"/>    
          <asp:ListItem Text="California"/>    
          <asp:ListItem Text="Campania"/>    
          <asp:ListItem Text="Catalonia"/>    
          <asp:ListItem Text="Coastal South Africa"/>    
          <asp:ListItem Text="France"/>    
          <asp:ListItem Text="Friuli-Venezia Giulia"/>    
          <asp:ListItem Text="Languedoc-Roussillon"/>    
          <asp:ListItem Text="La Rioja"/>           
          <asp:ListItem Text="Loire Valley"/>           
          <asp:ListItem Text="Lombardy"/>           
          <asp:ListItem Text="Madeira"/>           
          <asp:ListItem Text="Maule Valle"/>           
          <asp:ListItem Text="Mendoza"/>           
          <asp:ListItem Text="New South Wales"/>           
          <asp:ListItem Text="Oregon"/>           
          <asp:ListItem Text="Paarl"/>           
          <asp:ListItem Text="Piedmont"/>           
          <asp:ListItem Text="Puglia"/>           
          <asp:ListItem Text="Rapel"/>           
          <asp:ListItem Text="Rhone Valley"/>           
          <asp:ListItem Text="Sake"/>           
          <asp:ListItem Text="Sicily"/>           
          <asp:ListItem Text="Southern"/>           
          <asp:ListItem Text="South Island, NZ"/>           
          <asp:ListItem Text="South Africa"/>    
          <asp:ListItem Text="South Australia "/>    
          <asp:ListItem Text="Trentino-Alto Adige"/>    
          <asp:ListItem Text="Tuscany"/>    
          <asp:ListItem Text="Veneto"/>    
          <asp:ListItem Text="Vin de Pays"/>    
          <asp:ListItem Text="Washington"/>    
          <asp:ListItem Text="Western Australia"/>    
  </asp:DropDownList>      
        <asp:DropDownList id=country runat=server>
          <asp:ListItem Text="Country"/>    
          <asp:ListItem Text="Argentina"/>    
          <asp:ListItem Text="Australia"/>    
          <asp:ListItem Text="Chile"/>    
          <asp:ListItem Text="France"/>    
          <asp:ListItem Text="Italy"/>    
          <asp:ListItem Text="Japan"/>    
          <asp:ListItem Text="New Zealand"/>    
          <asp:ListItem Text="Spain"/>    
          <asp:ListItem Text="South Africa"/>    
          <asp:ListItem Text="USA"/>    
  </asp:DropDownList>
      <asp:DropDownList id=color runat=server>
        <asp:ListItem Text="Type"/>    
                <asp:listItem Text="Fortified" />        
                <asp:ListItem Text="Red" />        
              <asp:ListItem Text="Rose" />        
                <asp:ListItem Text="Sparkling" />        
                 <asp:ListItem Text="Sweet" />        
  </asp:DropDownList>
               
      <asp:DropDownList id=appellation runat=server>
    <asp:ListItem Text="Appellation"/>
    <asp:ListItem Text="Alexander Valley " />
    <asp:ListItem Text="Alsace" />
    <asp:ListItem Text="Alto Adige" />
    <asp:ListItem Text="Amador County " />
    <asp:ListItem Text="Amarone della Valpolicella" />
    <asp:ListItem Text="Arneis di Roero" />
    <asp:ListItem Text="Barbaresco" />
    <asp:ListItem Text="Barbera dAlba" />
    <asp:ListItem Text="Barolo " />
    <asp:ListItem Text="Barossa Valley" />
    <asp:ListItem Text="Barsac" />
    <asp:ListItem Text="Beaujolais" />
    <asp:ListItem Text="Beaujolais-Villages" />
    <asp:ListItem Text="Bordeaux" />
    <asp:ListItem Text="Brunello di Montalcino" />
    <asp:ListItem Text="Cairanne" />
    <asp:ListItem Text="California" />
    <asp:ListItem Text="California Shenandoah Valley" />
    <asp:ListItem Text="Carneros" />
    <asp:ListItem Text="Carneros, Napa" />
    <asp:ListItem Text="Cava" />
    <asp:ListItem Text="Chateauneuf-du-Pape, Rouge" />
    <asp:ListItem Text="Chianti" />
    <asp:ListItem Text="Chianti Classico" />
    <asp:ListItem Text="Chianti Classico Riserva " />
    <asp:ListItem Text="Coastal South Africa " />
    <asp:ListItem Text="Colchagua" />
    <asp:ListItem Text="Columbia Valley " />
    <asp:ListItem Text="Costieres de Nimes" />
    <asp:ListItem Text="Coteaux de Luberon, Rouge" />
    <asp:ListItem Text="Coteaux du Languedoc " />
    <asp:ListItem Text="Cotes de Castillon" />
    <asp:ListItem Text="Cotes-du-Rhone, Rouge" />
    <asp:ListItem Text="Franciacorta " />
    <asp:ListItem Text="Gattinara" />
    <asp:ListItem Text="Gavi" />
    <asp:ListItem Text="Givry, Rouge " />
    <asp:ListItem Text="Graves" />
    <asp:ListItem Text="Greco di Tufo" />
    <asp:ListItem Text="Haut-Medoc" />
    <asp:ListItem Text="Howell Mountain " />
    <asp:ListItem Text="Hunter Valley " />
    <asp:ListItem Text="IGT, Puglia " />
    <asp:ListItem Text="IGT, Sicily" />
    <asp:ListItem Text="IGT, Toscana" />
    <asp:ListItem Text="IGT, Toscana " />
    <asp:ListItem Text="IGT, Toscana" />
    <asp:ListItem Text="IGT, Veneto" />
    <asp:ListItem Text="IGT, Venezia Giulia " />
    <asp:ListItem Text="Jerez (Sherry)" />
    <asp:ListItem Text="Langhe" />
    <asp:ListItem Text="Langhorne Creek" />
    <asp:ListItem Text="Madeira" />
    <asp:ListItem Text="Margaret River" />
    <asp:ListItem Text="Margaux" />
    <asp:ListItem Text="Marlborough" />
    <asp:ListItem Text="Martinborough" />
    <asp:ListItem Text="Maule Valley" />
    <asp:ListItem Text="McLaren Vale" />
    <asp:ListItem Text="Medoc" />
    <asp:ListItem Text="Mendoza" />
    <asp:ListItem Text="Montepulciano dAbruzzo" />
    <asp:ListItem Text="Monterey County" />
    <asp:ListItem Text="Moscato dAsti" />
    <asp:ListItem Text="Moulis" />
    <asp:ListItem Text="Muscadet" />
    <asp:ListItem Text="Napa Valley" />
    <asp:ListItem Text="Nebbiolo dAlba" />
    <asp:ListItem Text="New South Wales" />
    <asp:ListItem Text="Oregon" />
    <asp:ListItem Text="Paarl" />
    <asp:ListItem Text="Pauillac" />
    <asp:ListItem Text="Pessac-Leognan " />
    <asp:ListItem Text="Pic Saint Loup" />
    <asp:ListItem Text="Pomero" />
    <asp:ListItem Text="Pomerol" />  
    <asp:ListItem Text="Puligny-Montrachet" />  
    <asp:ListItem Text="Rioja" />  
    <asp:ListItem Text="Russian River Valley" />  
    <asp:ListItem Text="San Gimignano" />  
    <asp:ListItem Text="Santa Barbara County" />  
    <asp:ListItem Text="Santa Cruz Mountains" />  
    <asp:ListItem Text="Santa Lucia Highlands" />  
    <asp:ListItem Text="Santa Maria Valley" />  
    <asp:ListItem Text="Santa Ynez Valley" />  
    <asp:ListItem Text="Sauternes" />    
    <asp:ListItem Text="Sonoma County " />  
    <asp:ListItem Text="South Africa" />  
     <asp:ListItem Text="South Australia" />  
     <asp:ListItem Text="South Eastern Australia " />  
     <asp:ListItem Text="Spring Mountain District " />
     <asp:ListItem Text="St. Emilion " />    
     <asp:ListItem Text="St. Estephe " />  
     <asp:ListItem Text="St. Julien " />    
     <asp:ListItem Text="Tokubetsu Junmai " />    
     <asp:ListItem Text="Vaucluse " />    
     <asp:ListItem Text="Vin de Pays " />    
     <asp:ListItem Text="Willamette Valley " />    
  </asp:DropDownList>      
      <asp:DropDownList ID="year" runat="server">
    <asp:ListItem Text="Vintage"/>  
    <asp:ListItem Text="1995"  />  
    <asp:ListItem Text="1996"  />  
    <asp:ListItem Text="1997"  />  
    <asp:ListItem Text="1998"  />  
    <asp:ListItem Text="1999"  />  
    <asp:ListItem Text="2000"  />  
    <asp:ListItem Text="2001"  />  
    <asp:ListItem Text="2001 Future"  />  
    <asp:ListItem Text="2002"  />  
    <asp:ListItem Text="2002 Future"  />  
    <asp:ListItem Text="2003"  />  
    <asp:ListItem Text="2003 Future"  />  
</asp:DropDownList>
                 </div>
</form>
                                                                                       
                                                                                            <p>
                                                                                              <input type="Button" id="Left" runat="server" value="Go" onserverclick="makeselection_Click" />
               </p>
             <p align="center">&nbsp;</p>
  <table width="111%" height="380"  border="0" align="left" bgcolor="#FFFFFF">
          <tr>
            <td width="47%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="53%"><div align="center">
              <p><img src="41.gif" width="194" height="124"></p>
              <p><img src="saveas.gif" width="184" height="30"></p>
            </div></td>
          </tr>
          <tr>
            <td height="239" bgcolor="#FFFFFF"><div align="center">
              <p>&nbsp;</p>
              <table width="50%"  border="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td> Sign up for email offers and savings. <form runat="server">
                        <asp:TextBox id="emailoffer1" runat="server" size="25"></asp:TextBox>
                        <input id="CmdUpload" type="button" value="Upload" runat="server" onserverclick="emailoffer" />
                    </form></td>
                </tr>
              </table>
0
Comment
Question by:dprasad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 400 total points
ID: 11986775
I see you have two "<form" tags...  Are you trying to add user control  or a page template? Why do you need two Form tags ?
http://www.fawcette.com/vsm/2001_12/magazine/columns/aspnet/
-Baan
0
 
LVL 19

Assisted Solution

by:arif_eqbal
arif_eqbal earned 50 total points
ID: 11987130
Well yes now you can have only one Form Tag per page
But that is not a serious limitation at all, you can still achieve similar results. can you be specific what exactly you want...
0
 
LVL 1

Assisted Solution

by:ahmedrashid
ahmedrashid earned 50 total points
ID: 11987656
well if you are using a qwb user control then just simply remove the <form></form> tags from the user control forms and hopefully your problem will be solved.
0
 

Author Comment

by:dprasad
ID: 11992808
Got it, thanks guys!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question