How to Call Custom Web service through JavaScript in Asp.Net.
In this post I am going to Show How we can create a web Service and consume it through javascript i.e Calling a web service in Javascript using Asp.Net/ Calling a WebService in Javascript in Microsoft Dynamics CRM. 1. First of all create a web service by going to Visual Studio-> Select New Website-> WebService -> Service.cs 2. Create a new WebMethod or update your HelloWorld WebMethod as below, I have create a sample Web service which accepts 2 parameters and based on that returns a string value: string[,] stocks = { { "Infy", "Infosys", "122.35" }, { "DSS", "Direction", "98.22" } }; [WebMethod] public string getName(string symbol, string Name) { for (int i = 0; i < stocks.GetLength(0); i++) { if (String.Compare(symbol, stocks[i, 0], true) == 0 || String.Compare(Name, stocks[i + 1, 0], true) == 0) { return ("Stock Value of ...