unable to call a c# method from javascript using ajax
<p>I have a c# method which I would like to call on client side.
I used ajax calling to achieve this</p>

<pre><code>function ValidateIfDuplicate()
        {
            debugger

            var billtext = $("#ctl00_ContentPlaceHolder2_textBoxBillNumber").val();
            var retailer= $("#ctl00_ContentPlaceHolder2_dropDownListRetailers").val();
            var billdate = $("#ctl00_ContentPlaceHolder2_textBoxBillDate").val();

            if (billtext == "")
            {
                alert("Bill Number cannot be left empty");
                return false;
            }
            else if (retailer == 0) {
                alert("Please select a Retailer");
                return false;
            }
            else if (billdate == '') {
                alert("Date cannot be left empty");
                return false;
            }
            else if (billtext != '' &amp;&amp; retailer != '' &amp;&amp; billdate != '')
            {


                    $.ajax({
                        Type: "POST",
                        url: "CAInvoiceEntry.aspx/ValidateDuplicateEntry",
                        contentType: "application/json; charset=utf-8",
                        data: { billtext1: billtext, billdate1: billdate, retailer1: retailer },
                        dataType: "json",
                        success: function (result) {
                            debugger
                            alert(result.d);
                        }
                    });

                return true;
            }
        }
</code></pre>

<p>and this is my c# method</p>

<pre><code>[System.Web.Script.Services.ScriptService] 
public partial class CAInvoiceEntry: BaseClass
{
    [WebMethod, ScriptMethod()]
        public static int ValidateDuplicateEntry(string billtext1, string billdate1, string retailer1)
        {
            string validatebill = objCAInvoiceEntry.validatebilldate(textBoxBillNumber.Text, billdate1.ToString(), ViewState[AppConstants.UploadedBy].ToString(), dropDownListRetailers.SelectedValue);
            if (validatebill == "1")
            {

                return 1;
            }
            else
                return 0;
        }
}
</code></pre>

<p>but the web method is not fired. 
I have also tried using pagemethods.methodname() as an alternative(by registring the script with enablepagemethods=true) but with no effect.</p>

<p>If someone can guide me on where i am doing it wrong?
Just to be clear..
in the below image you can see the breakpoint execution, where the ajax call gets skipped.
<a href="https://i.stack.imgur.com/8DVMh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8DVMh.png" alt="enter image description here"></a></p>