This tutorial will show how we can create a Web Service that will allow us to convert from Fahrenheit to Celsius, or vice versa. VB version.

Web Services allow you to use applications in your Web Project. In this demonstration, we will show how we can easily implement an application into our Web Project. We will write two simple methods that will enable us to convert Fahrenheit into Celsius, and vice versa. The methods will be the Web Service, and theoretically, be stored on a different web server than our Web Project that is using it.

First, we start off with a Web Service Porject in Visual Studio .NET
Then we will add the logic to the App_Code folder, in the .vb file:

We now need a form to call the Web Service, as well as send the number to convert. For this, we create a web form and allow the user to either convert from Fahrenheit to Celsius, or Celsius to Fahrenheit.

The ASPX page should look something like the following:

Download Source Files