title: How to retrieve value from asp.net textbox from javascript?
body: <p>I have an asp.net web form with a couple of asp.net textbox controls:</p>
  
  <pre><code>&lt;asp:TextBox ID="txtTextBox" runat="server" /&gt; .
  </code></pre>
  
  <p>I have a javascript file tools.js that are included in the page:</p>
  
  <pre><code>&lt;script src="tools.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>How can I access the value from txtTextBox from javascript?</p>
  
  <p>Ive tried using</p>
  
  <pre><code>document.getElementById('&lt;%= txtTextBox.ClienID %&gt;').value;
  document.getElementById('&lt;%= txtTextBox.UniqueID %&gt;').value;
  document.getElementById('&lt;%= txtTextBox %&gt;').value;
  </code></pre>
  
  <p>but none of them works. </p>
  
  <p>Any ideas?</p>