title: How to save image using fileuploader through Ajax
body: <p>I have a employees adding Aspform. It consist of all details about employee with his image. Now all the data are saved using Ajax and Webmethod. But image uploading are not working. All other informations are passing through a array
  to Webmethod.</p>
  
  <p>i have a fileuploader button and a image preview thumbnail. But i do not know how to save image, what are the columns required for this, how to take image path, how to transfer uploaded image to our project's folder and how to set rename the image to employeeId.</p>
  
  <p>my code is bellow</p>
  
  <pre><code> &lt;div class="col-sm-2"&gt;
                                          &lt;div class="fileinput fileinput-new" data-provides="fileinput"&gt;
                                              &lt;div id="mypic" class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 84px; height: 84px;"&gt;
                                                  &lt;img id="img1" src="img/DummyImg.png" alt=""&gt;
                                              &lt;/div&gt;
                                              &lt;div&gt;
                                                  &lt;span class="profile_pic_btn_wrap"&gt;
                                                      &lt;input type="file" onchange="readQuestURL(this);" name="profile_pic_file" class="profile_pic_file" /&gt;
                                                      &lt;span class="profile_pic_btn"&gt;Select Image&lt;/span&gt;
                                                  &lt;/span&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;                                 
                                      &lt;/div&gt;
  
  
  
  
              $.ajax({
  
                  type: "POST",
                  dataType: "json",
                  contentType: "application/json",
                  url: "staffinfo.aspx/SaveStaffInfo",
                  data: JSON.stringify({ edit: edit, arr: arr, superioremployee: superioremployee }),
                  success: function (msg) {
                      if (msg.d != "") {
                          var x = msg.d;
                          x = x.split(",");
                          document.getElementById('hdnStaffId').value = x[1];
                          alert(x[0]);
                          EmployeeCount();
                      }
  
                  },
                  error: function (msg) {
                      alert(msg.d);
                  }
              });
  </code></pre>