i am trying to call code behind method from jquery ajax call but it doesnt hit break point on that methhod. what i am missing ?
js
$('#btn_Submit').click(function () {
$.ajax({
url: 'ajaxExecute.aspx/CAO2',
data: 'Guardian=' + $('#txtGuardianName').val() + '&CIFID=' + $('#txtCIFID').val() + '&EmploymentType=' + encodeURIComponent($('#cmbEmploymentType').val()) + '&NatureIncome=' + encodeURIComponent($('#cmbIncomeNature').val()) + '&Occupation=' + encodeURIComponent($('#cmbOccupation').val()),
cache: false,
context: document.body,
type: 'POST',
success: function (response) {
}
});
}
ajaxExecute.aspx.cs
public partial class ajaxExecute : System.Web.UI.Page
{
[WebMethod]
public static void CAO2(string Guardian, string CIFID, string EmploymentType, string NatureIncome, string Occupation)
{
//Some Code
//No breakpoint hit here
}
protected void Page_Load(object sender, EventArgs e)
{
//Some Code
// Got Breakpoint here
}
}
&CIFID=