WebService Is Undefined Error In ASP.NET 4.0
1. First step is to add reference to the web service using Ajax Script Manager: <asp:ScriptManager ID= "ajaxManager" runat= "server" > <Services> <asp:ServiceReference Path= "~/Services/ProductService.asmx" /> </Services> </asp:ScriptManager> 2. Secondly is to include the namespace in calling the webservice method From ProductService.GetProducts( function (data) { $.each(data, function (index, elem) { $( "<option />" ) .text(elem.ProductName) .val(elem.ProductID) .appendTo( "#products" ); }); } ); To AccessingServerSideDataUsingClientScript.Services.ProductService.GetProducts( function (data) { $.each(data, function (index, elem) { $( "<option />" )