title: How to replace partially asp.net page with a jquery ajax request?
body: <p>Let's say, I have a Listview control on the page. Each Listview item has 2 dropdownlists and 1 textbox. When the first dropdownlist has a selected value changed, the second dropdownlist should be populated with city depending on the first one. Finaly, when a value is selected for the second dropdownlist, a cost should appear on the textbox. </p>
  
  <pre><code>&lt;asp:ListView ID="_lsvCostFinder" runat="server"&gt;
      &lt;LayoutTemplate&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;th&gt;Country&lt;/th&gt;
                  &lt;th&gt;City&lt;/th&gt;
                  &lt;th&gt;Cost&lt;/th&gt;
              &lt;/tr&gt;
              &lt;tr  runat="server" id="itemPlaceHolder"&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/LayoutTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;asp:DropDownList ID="_ddlCountry" runat="server" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged" AutoPostBack = "true"&gt;
                  &lt;/asp:DropDownList&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;asp:DropDownList ID="_ddlCity" runat="server" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged" AutoPostBack = "true"&gt;
                  &lt;/asp:DropDownList&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;asp:TextBox ID="_txtCost" runat="server"&gt;&lt;/asp:TextBox&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:ListView&gt;
  </code></pre>
  
  <p>Now I want to use ajax when user selects a different value for the dropdownlist</p>
  
  <pre><code>$('select').change(function () {
     $.ajax({
    type: "POST",
    url: "Default.aspx/DropDownList1_SelectedIndexChanged",
    data: "{}",
    success: function(msg) {
      // Replace the div's content with the page method's return.
      //
    }
   });
  </code></pre>
  
  <p>I want to replace only the entire <strong>tr</strong> element. Those are my questions:</p>
  
  <ol>
  <li><p>What should I send in the data? The value of the dropdownlist?</p></li>
  <li><p>How do I replace only the <strong>row</strong> containing the dropdownlist that triggered the ajax call?</p></li>
  </ol>
  
  <h1>EDIT</h1>
  
  <p>All the methods have the following signature</p>
  
  <pre><code>protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
  </code></pre>
  
  <p>It's a very long and complex page. </p>
  
  <p>Thanks for helping  </p>