i want to call a c# function from aspx page i tried it like below
function DeleteKartItems(callback) {
$.ajax({
type: "POST",
url: 'About.aspx/updatingdatabase',// my function name in c#
data: '{"username":"' + col1 + '","password":"' + col2 + '","age":"' + col3 + '","city":"' + col4 + '","id":"' + idlast + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var x = data.d;// i am trying to store the return data into a local variable
},
error: function (e) {
}
});
}
my problem is its works fine when i write the c# function as static , but other wise it will not work, i want to know is there any method for calling a non-static c# function from aspx page Thanks in advance