title: Reading ASP.NET text box value with JavaScript
body: <p>I am using a ASP.NET(3.5) page and I have a text box called txtName.</p>
  
  <p>I want to read the value with JavaScript like so but it does not work.</p>
  
  <pre><code>var Name = document.getElementById(txtName).value;
  alert(Name);
  </code></pre>
  
  <p>Even this does not want to work:</p>
  
  <pre><code>var Name = document.FormName.txtName.Value;
  alert(Name);
  </code></pre>
  
  <p>This work with plain HTML pages but not with my ASP.NET page, why?</p>