Yes. We can call C# code-behind function via $.ajax. But for do that it is compulsory to mark the method as WebMethod.