title: Accessing hidden field value in javascript
body: <p>I have a hidden field in my form, I'm setting the hidden field's value on the server and trying to access this value from javascript, </p>
  
  <p>I get the error: Unable to get value of the property 'value': object is null or undefined</p>
  
  <p>If I view the source the hidden field value is set and the ID of the hidden field is the same as the ID I'm calling.</p>
  
  <p>ASPX</p>
  
  <pre><code>            var v = document.getElementById('hxValue').value;
              &lt;asp:HiddenField ID="hxValue" runat="server"/&gt;
  </code></pre>
  
  <p>VB</p>
  
  <pre><code>            hxValue.Value = "Value1"
  </code></pre>
  
  <p>I recall doing this before and it should be relatively simple but for some reason, i'm not getting it right.</p>