title: Reducing load times of ASP.NET WebForms page with large tables
body: <p>I have a WebForms page with a treeview on the left and grids on the right.  When the user clicks a treeview node, the corresponding grid is populated using a SqlDataSource and then displayed.  The whole thing's in a single UpdatePanel.</p>
  
  <p>Here's my setup:</p>
  
  <pre><code>&lt;asp:GridView runat="server" ID='LocationsRowGrid' AutoGenerateColumns="false" DataSourceID="SqlDataSource_LocationRow"&gt;
      &lt;Columns&gt;
          &lt;asp:TemplateField HeaderText="Location"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:DropDownList runat="server" ID="NAME_LCTN" OnDataBound="dropdown_DataBound"
                          DataTextField="NAME_TO_LCTN" DataValueField="NAME_TO_LCTN" DataSourceID="SqlDataSource_LocationNames"&gt;
                      &lt;/asp:DropDownList&gt;
                  &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="Move Time (HR)"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:TextBox runat="server" ID="STD_MOVE_TME_AMNT" Text='&lt;%# Bind("STD_MOVE_TME_AMNT") %&gt;'&gt;&lt;/asp:TextBox&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:BoundField DataField="LAST_UPDATED_BY" HeaderText="Updated By" Visible="true" /&gt;
          &lt;asp:BoundField DataField="LAST_REV_DT" HeaderText="Revision Date" Visible="true" /&gt;
      &lt;/Columns&gt;        
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>There are other (larger) grids, but this is basically the template.  The largest grid has about twelve columns, about six of which are templatefields with textboxes and one of which is a templatefield with a dropdown list.  The dropdown is databound to another table, which has about 150 elements.  The grid itself has about 100 entries.</p>
  
  <p>This is slow.  It seems like the problem might have to do with the rendering of the HTML - the server isn't taking TOO long to respond, but the browsers (Chrome and IE) are nearly falling over trying to render the result.  My first (obvious) guess is that rendering 100 html selects, each with > 100 elements, is going to slow - especially when done all at once inside tables tags like ASP.NET will do.</p>
  
  <p>Does this seem like a reasonable guess at the cause of the slowness?</p>
  
  <p>For this project I am (currently) not allowed to use jQuery (or presumably any other javascript library) and must justify any and all javascript I use.  Basically, other developers don't want to need any real understanding of javascript to be able to maintain this application when I'm done with it.</p>
  
  <p>Given these constraints, is there anything I can do to reduce the size of the returned HTML and/or the render times in the browser?  Thanks in advance.</p>