I am getting my inner html through following JavaScript AJAX function: Following Code is not working... I also tried ajax with no success.
jQuery (AJAX Code)
$('#Button1').click(function () {
var HTML = document.getElementById("selected-column-1").innerHTML;
alert(HTML);
$.ajax({
type: "post",
url: "Default.aspx/save_rec",
data: {"HTML":HTML},
dataType: "json",
success: function (result) {
//alert('sucess' + result.d);
}
});
});
But neither of these approaches hit my this method.
C#
[WebMethod]
public static string save_rec(string HTML)
{
return "";
}
But this approache not hit my C# method
console error
c# message invalid object passed in member name expected