title: How to Access ASP control located in a user control via JavaScript
body: <p><strong>Hi All,</strong></p>
  
  <p>I'm designing a user control, briefly it contains an asp:hiddenfield control, i'm going to access it via JavaScript function like this</p>
  
  <pre><code>function doAnyThing
  {
      var myVar = document.getElementById("myHiddenFiled");
  }
  </code></pre>
  
  <p>but when I trace my code I found myVar assigned to null, does it matter </p>
  
  <pre><code>document.getElementById()
  </code></pre>
  
  <p>method is used in user control file (.ascx) or in regular (.aspx) file, taking into consideration it works in (.aspx) file correctly</p>