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


i added page html code master page , got mistake when launched page. wonder did wrong!??!

    <%@ page title="" language="c#" masterpagefile="~/yourgurumaster.master" autoeventwireup="true" codefile="yourguru.aspx.cs" inherits="yourguru" %>      <asp:content id="content1" contentplaceholderid="head" runat="server">         <style type="text/css">             .style3             {                 width: 114px;             }         .style4         {             width: 293px;         }         .style5         {             width: 126px;         }         </style>     </asp:content>  <asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server">     <form id="form1" runat="server">        <div align="center">         <p>             <asp:textbox id="question" runat="server" style="margin-left: 0px" width="584px"></asp:textbox>         </p>        </div>       <div align="center">         <table style="width: 553px">              <tr>                     <td class="style3">                         <asp:button id="ask" runat="server" text="שאל" width="50px" />                              </td>                      <td class="style4">                         <asp:dropdownlist id="dropdownlist1" runat="server">                         </asp:dropdownlist>                         &nbsp   &nbsp   &nbsp                         <asp:dropdownlist id="dropdownlist2" runat="server">                         </asp:dropdownlist>                          &nbsp   &nbsp   &nbsp                          <asp:dropdownlist id="dropdownlist3" runat="server">                           </asp:dropdownlist>                          </td>                          <td class="style5">                             <asp:button id="answer" runat="server" text="ענה" width="50px" />                         </td>                  </tr>             </table>     </div>     </form> </asp:content> 

asp.net web forms won't let put more 1 form tag in page - master page contains form tag, this:

<asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server"> <form id="form1" runat="server">    <div align="center"> 

will cause problems it's trying add form tag. don't need form here anyways form tag in master page quite adequate.


Comments