title: document.getElementById("FileUpload1"); is giving null/undefined value in IE
body: <p>I am getting the file name in Chrome browser but in IE i am getting null value.
  I want to display choose file name in asp.net html and java script only.
  The attached code is below  </p>
  
  <pre><code>var files = document.getElementById("FileUpload1");
  </code></pre>
  
  <p>is giving me null / undefined value and </p>
  
  <pre><code>var fileName = document.getElementById("FileUpload1").files[0].name
  </code></pre>
  
  <p>is giving the error asUnable to get property '0' of undefined or null reference</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function showFileName() { 
      document.getElementById("FileUploadedLabel").style.color = "black";
      var files = document.getElementById("FileUpload1"); 
      if(files != null &amp;&amp; files != undefined &amp;&amp; files != 'undefined') { 
          var fileName = document.getElementById("FileUpload1").files[0].name; 
          document.getElementById("FileUploadedLabel").innerHTML = "File name:-" + fileName;
      } 
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="image-upload"&gt;
      &lt;label for="FileUpload1"&gt;
          &lt;img src="button_choose-file.png" class="image" style="height:30px; width:100px" /&gt;
      &lt;/label&gt;
      &lt;asp:FileUpload runat="server" ID="FileUpload1" Style=" display:none;" onmouseover="mouseOverUpload()" onmouseout="mouseOutUpload()" Onchange="showFileName()"/&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>