title: upload file(image) using js and webservice C#
body: <p>So far I found something related to what I am looking for, but I'm not sure if this is what I need: <a href="https://stackoverflow.com/questions/12479273/javascript-sendfile-binary-data-to-web-service">link</a></p>
  
  <p>How do I convert the file to byte in js and send it to webservices to upload to server.</p>
  
  <p>Example:</p>
  
  <p>JS:</p>
  
  <pre><code>&lt;script&gt;
      webService.UploadFile(Myfilebytes,suc,fail);
  &lt;/script&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>[Web Method]
  public string UploadFile(byte[] Myfilebytes)
  {
       //UPloading script
      return "OK";
  }
  </code></pre>