Image Delete Using Angularjs with ASP.NET

Js File Code
  1. $scope.Delete = function(id) {  
  2.     for (i in $scope.users) {  
  3.         if ($scope.users[i].id == id) {  
  4.             if ($scope.users[i].photo != "noimage.jpg") {  
  5.                 $.ajax({  
  6.                     type: "POST",  
  7.                     url: "UsersFormJson.aspx/DeleteImage",  
  8.                     contentType: "application/json; charset=utf-8",  
  9.                     data: JSON.stringify({  
  10.                         hid: $scope.users[i].photo  
  11.                     }),  
  12.                     success: function(data) {  
  13.   
  14.                     },  
  15.                     error: function() {}  
  16.                 });  
  17.             }  
  18.         }  
  19.     }  
  20. };  
Asp.net File Code
  1. <Services.WebMethod()>  
  2. Public Shared Function DeleteImage(ByVal hid As StringAs String  
  3. If System.IO.File.Exists("D:\manish\Project\Project\upload\" & hid) Then  
  4.    System.IO.File.Delete("D:\manish\Project\Project\upload\" & hid)  
  5. Else  
  6.    Return False  
  7. End If  
  8.    End Function