title: Cross browser File input validation in asp.net 2.0
body: <p>input type file or the file upload html control/ asp.net control value seems to change depending on browsers.</p>
  
  <pre><code>&lt;input type="file" id="fileUpload" name="fileUpload" /&gt;
  </code></pre>
  
  <p>Chrome:
  fileUpload.value gives c:\fakePath\filename</p>
  
  <p>Firefox:
  fileUpload.value gives filename.ext</p>
  
  <p>ie:
  fileUpload.value gives Full path+filename</p>
  
  <p>i used a regular expression validator with validation expression as below</p>
  
  <pre><code>^[a-za-zA-Z0-9_\.]{3,28}\.(pdf|txt|doc|docx|png|gif|jpeg|jpg|zip|rar)$
  </code></pre>
  
  <p><strong>carries out below process:</strong></p>
  
  <ol>
  <li>File name must be 3 to 28 characters</li>
  </ol>
  
  <p>2.Extension must match the group only.</p>
  
  <p>Since the value of fileUpload control is different in different browsers how do i validate it now??</p>