title: Can You have iterative Ajax forms in ASP.NET?
body: <p>I'd like to have X number of <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="nofollow noreferrer">Ajax</a> panels on my list page which is inside a master Page for site consistency. </p>
  
  <p>The tutorials I'm coming across on <a href="http://www.asp.net/ajax/" rel="nofollow noreferrer">ASP.NET Ajax</a> seem to imply I need a <code>&lt;form&gt;&lt;asp:ScriptManager ID="asm" runat="server"/&gt;&lt;/form&gt;</code> around my <code>&lt;table&gt;&lt;/table&gt;</code> layout. I would think for this function (each code being an individual Ajax element) that each <code>&lt;tr&gt;&lt;/tr&gt;</code> would be a form unto itself. So that actions specific to a code only trigger an Ajax Async postback of that piece. Here's what I imagine the proper layout would look like:</p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;
                  Code
              &lt;/th&gt;
              &lt;th&gt;
                  Description
              &lt;/th&gt;
              &lt;th&gt;
                  Document
              &lt;/th&gt;
              &lt;th&gt;
                  Customer Contact Required for Resolution
              &lt;/th&gt;
              &lt;th&gt;
                  Associate
              &lt;/th&gt;
              &lt;th&gt;
                  Shareholder
              &lt;/th&gt;
              &lt;th&gt;
                  Customer
              &lt;/th&gt;
              &lt;th&gt;
                  Regulatory
              &lt;/th&gt;
              &lt;th&gt;
                  Root Cause
              &lt;/th&gt;
              &lt;th&gt;
                  Investor Requirements
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  
      &lt;tbody&gt;
          &lt;% foreach (var item in GetCodes())
          { %&gt;
              &lt;tr&gt;
                 &lt;form&gt;&lt;asp:ScriptManager ID="asm" runat="server"/&gt;
                   &lt;asp:UpdatePanel runat="server"&gt;
                     &lt;td&gt;&lt;%=item.Code %&gt;&lt;/td&gt;&lt;td&gt;item.Description&lt;/td&gt;&lt;td&gt;&lt;%=item.Document %&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:ListBox ID="lbAssociate" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:ListBox ID="lbShareholder" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:ListBox ID="lbCustomer" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:ListBox ID="lbRegulatory" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:dropdownlist ID="ddlRoot" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:CheckBox 
                           ID="_ckbAllInvestorRequirements" 
                           runat="server" 
                           Text="All" 
                           onclick="AllInvestorClicked()" /&gt;
                         &lt;asp:CheckBoxList 
                           ID="_cblInvestorRequirements" 
                           runat="server"&gt;
                         &lt;/asp:CheckBoxList&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;asp:Button ID="Submit" Text="Submit" runat="server" /&gt;&lt;/td&gt;
                   &lt;/asp:UpdatePanel&gt;
                 &lt;/form&gt;
              &lt;/tr&gt;
          &lt;% } %&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Is this the proper layout for iterative Ajax mini-forms? It appears <a href="http://en.wikipedia.org/wiki/XHTML" rel="nofollow noreferrer">XHTML</a> doesn't like the idea of a <code>&lt;table&gt;</code> having <code>&lt;form&gt;</code> inside it so how could I lay this out? I would think wrapping the whole table in a form would result in all the items being reloaded on each request instead of a single line item.</p>