using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Web;using System.Web.Services;namespace SampleWebServices{ public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod(Description = "Formats parts of a name into a proper name." )] public string FormatProperName(string strSalutation, string strLastName,string strFirstName, string strSuffix) { if (!strSalutation.EndsWith(".")) strSalutation += "." ; return string.Format("{0} {1} {2} {3}",strSalutation,strFirstName,strLastName, strSuffix); } }}