title: jQuery Autocomplete not persisting values during ASP.NET postback
body: <p>I have a really simple problem that I am struggling to find a solution for. </p>
  
  <p>Basically I have an ASP.NET textbox declared as such.</p>
  
  <pre><code>&lt;asp:TextBox runat="server" ID="txtCourse" CssClass="input-xlarge HighlightibleField" placeholder=""&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>Onto this textbox I have bound a the jQuery UI autocomplete widget like this.</p>
  
  <pre><code>$("#&lt;% =txtCourse.ClientID %&gt;").autocomplete({
      source: ["Course1", "Course2", "Course3"],
      select: function (event, ui) {
          __doPostBack("&lt;% =btnPostBacker.UniqueID %&gt;", "");
      }
  });
  </code></pre>
  
  <p>The postback occurs as expected however the txtCourse.Text will not persist (or postback) the value that it was populated with. </p>
  
  <p>So for example, I go ahead and select "Course1", the value is populated into the txtCourse textbox, the postback occurs and I view the value of txtCourse.Text and it will still be only the text that I have inputted using the keyboard (eg: "c").</p>
  
  <p>I have tried setting a timer to delay the execution of the postback ever so slightly as such: </p>
  
  <pre><code>setTimeout(function () {
      __doPostBack("&lt;% =btnPostBacker.UniqueID %&gt;", "");
  }, 500);
  </code></pre>
  
  <p>And while this seems to work, I feel it shouldn't be necessary and have no idea why it is required.</p>
  
  <p>What am I doing wrong? Any help would be sincerely appreciated.</p>