Expecting
What will be the value in the textbox that value should be sent to the backend? I think the issue with the call, but I don't where it is
Javascript
function employeeLeavesList() {
                        var emp = {}
                        emp.EMPID = $("#employid").val();
                        alert(emp.EMPID);
                        $.ajax({
                            type:'POST',
                            url: 'service.asmx/employee_leaveslist',
                            data: JSON.stringify(emp),
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            success: function (data) {}
                        });
                    }
class.cs
public class emp
{
    public string EMPID { get; set; }
}
webmethod.asmx.cs
[WebMethod]
        public void employee_leaveslist()
        {
            emp emp = new emp();
            List<employee_leave_list> list = new List<employee_leave_list>();
            SqlConnection connection = new SqlConnection("Data Source = Champ; Initial Catalog = sample; Integrated Security = True");
            SqlCommand cmd = new SqlCommand("select emp_id,leaves_form, leaves_upto, leave_type, description, status, no_of_leaves from leaverequest where emp_id = '" + emp.EMPID + "' ", connection);
            cmd.CommandType = CommandType.Text;
            connection.Open();
            SqlDataReader idr = cmd.ExecuteReader();
            connection.Close();
        }
 
     
    