7
Reply

Webmethod is not called in asp.net C#

chetan shinde

chetan shinde

Aug 23 2017 6:48 AM
322
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)