I have basic knowledge to create a web service using asmx.cs and consume from any client application. I want to create a Web Service using asmx.cs in .NET 3.5 using Visual Studio 2010. For the following program,By default it gives textBox to take input from user. But I want to use comboBox to take input from the user. The result will be displayed as xml output. I want to do a Web Service program where one city from ComboBox will be taken as input and the temperature will be shown as xml output. This code gives only textBox as input.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace WebService1 { public class Service1 : System.Web.Services.WebService { [WebMethod] public string GetCityByZip(int Zip) { return "City Name = XYZ, Temperature = 30 Degree"; } } }