Hot to convert HTML data into json and get all record into web method then store into database
$.ajax({
var table = document.getElementById("table");
var r = tableToJson(table);
console.log(r);
type: "POST",
url: "CourseSubTopicMaster.aspx/SaveData",
data: "{'json' : " + JSON.stringify(r) + "}",
processData: false,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.d);
}
});
[WebMethod]
public static string SaveData(string data)
{
}
it not work