Create webservice in Visual Studio 2008
Author: Zunnair
In this article we learn about the process of creating webservice
To create a webservice, Open Visual Studio IDE. From FILE menu, Select NEW and then select Project as mentioned in the screenshot below:

From the New Project dialouge box, Slect Visual C# from the project types and ASP.NET Web Service Application from the Visual Studio Installed Templates. Change the name of the Project as your requirement

After the creation of project, Code behind file, Service.asmx.cs will be opened by default. You can rename the file from the solution explorer. Rename the file as service name. Now in the attribute [WebMethod] a default simple method of hello world is written, which can be replaced by the required web method. In the Namespace give the URL, http://localhost/MyWebSerivces. MyWebServices is the folder containing web services. It can be named as per your convenience.

After completing editing, Build the solution by right clicking the project solution in the solution explorer or press Build from the toolbar or use Ctrl +Shift+B.

These are simple steps to create web service, now you can write your functions in testService.asmx file