title: Get ASPNET Control Value Using jQuery and Update Panel
body: <p>I have an asp.net  button and an asp.net label in an update panel and when I click the button it updates the text of the label in the code behind. However when I try to get the updated value it just returns an empty value.</p>
  
  <p>How do I get the updated value after the asynchronous postback has completed. I have included my code below.</p>
  
  <p>Many thanks</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      Sys.Application.add_init(function() {
  
          // Add ajax request handlers
          Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
  
          // Raised after asynchronous postback has completed
          function EndRequest(sender, args) {
              var path = $('#&lt;%=lblPath.ClientID %&gt;').val();
              alert(path);
          }
      });
  &lt;/script&gt;
  
  &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
  &lt;/asp:ScriptManager&gt;
  &lt;asp:UpdatePanel runat="server" ID="UpdatePanel1"&gt;
      &lt;ContentTemplate&gt;
          &lt;asp:Panel ID="Panel1" runat="server"&gt;
              &lt;asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                      OnClick="Submit_Click" UseSubmitBehavior="false" /&gt;
          &lt;/asp:Panel&gt;
          &lt;asp:Label ID="lblPath" runat="server"&gt;&lt;/asp:Label&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>