title: Uploading Files Not Working - trim the initial characters
body: <p>I am trying to upload a file using the WebBrowser control. It trims the starting character sometimes one and sometimes three then choose window gives error <code>Invalid file name!</code>. Can't seem to do it and need some help.</p>
  
  <p>Here is the Html:</p>
  
  <pre><code>    &lt;input name="UploadedFile" id="UploadedFile" type="file" /&gt;
      &lt;input name="up" id="up" type="button" value="Upload" /&gt;
  </code></pre>
  
  <p>Here is the vb code:</p>
  
  <pre><code>Dim el = elc.GetElementsByName("UploadedFile")
  el.Item("UploadedFile").Focus()
  '    SendKeys.Send("Capture.png" &amp; "{ENTER}")
  SendKeys.Send("C:\Capture.png" + "{ENTER}")
  el.Item("UploadedFile").InvokeMember("Click")
  </code></pre>
  
  <p>that the file upload button comes up and hit enter, but can't input full filename into the file name area.</p>
  
  <p>If I use this<code>SendKeys.Send("C:\Capture.png" + "{ENTER}")</code>. It gives this error:
  <a href="http://i.stack.imgur.com/Mlyi9.png" rel="nofollow">Choose window error screenshot</a></p>
  
  <p>If I use this <code>SendKeys.Send("Capture.png" + "{ENTER}")</code>. It gives this error:
  <a href="http://i.stack.imgur.com/oObLv.png" rel="nofollow">Choose window error screenshot</a></p>
  
  <p>And if I put extra character then it works fine but it doesn't always trim one character so I can't put an extra character to solve this error.</p>