Web Services or webservices
Creating Webservice in Visual Studio:
1. Visual Studio installed templates, select ASP.net Web Service
2. Save it giving a name TemperatureWebService
3. Right click application name, add new item, select Web service, name it Convert
4. Two files are created, Convert.cs and Convert.asmx
5. Add following code in Convert.cs
[System.Web.Services.WebMethod()]
public double FahrenheitToCelsius(double Fahrenheit)
{
return((FahrenheitToCelsius - 32) *5)
}
[System.Web.Services.WebMethod()]
public double CelsiusToFahrenheit(double Celsius)
{
return ((Celsius * 9) / 5) +32;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment