chetan shinde

chetan shinde

  • NA
  • 108
  • 45.9k

Webmethod is not called in asp.net C#

Aug 23 2017 6:48 AM
Hi i am writing a code to send file from javascript to web mothod, but my web method is not isteat it called pageload method. please help 
here is my code
 
$.ajax({
type: "POST",
url: "Content_New.aspx/UploadFiles",
data: obj,
processData: false,
contentType: false,
dataType: "json",
success: function (result) { alert("successful!"); },
//async: true
})
[WebMethod(EnableSession =true)]
public static void UploadFiles()
{

Answers (7)