reference :
http://sarangasl.blogspot.sg/2010/09/create-simple-web-service-in-visual.html
1. Right click on the Solution, and Add "New Project" as below :
2. Edit code "Service1.asmx", and add new simple method , codes as below :
publicclassService1 : System.Web.Services.WebService
{
//[WebMethod]
//public string HelloWorld()
//{
// return "Hello World";
//}
[WebMethod]
publicstring simpleMethod(String srt) { return"Hello " + srt; }
[WebMethod]
publicint anotherSimpleMethod(int firstNum, int secondNum) { return firstNum + secondNum; }
}
3.Right click on "Service1.asmx" , choose "View in Browser" as shown in below :
4. Create a test client following steps in reference. Run the test program.