7
Answers

Webmethod is not called in asp.net C#

chetan shinde

chetan shinde

7y
375
1
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)