Hi All ,
how to pass the textbox value in webmethod in codebehind through ajax call method.
sample method :
$(function () {
// var stDt = $("#txtStartDt").val();
$.ajax({
type: "POST",
url: "InteractiveDashboard.aspx/Web_GetTotalSaleslist",
data: "{'StartDate':'" + stDt + "','EndDate':'" + EndDt + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
//alert(response.d);
alert("Error..1");
},
error: function (response) {
alert("Error..2");
alert(response);
}
});
});