Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding a web service to an ASP.NET project

Status
Not open for further replies.

maac74

Technical User
Jul 27, 2005
12
0
0
US
hello all,
I'm new to the ASP.NET world and was looking to figure out how to connect a web service to an asp.net VB.NET project. I found a web service from here that gives the weather from any US zipcode that is submitted. If anyone knows of any good tutorials to get me started on this it would be much appreciated.
 
To be honest, it's fairly simple (although feel free to google for any tutorials).

Taking the web service in question, all you have to do is open your project, right-click it in the solution explorer and click Add Web Reference. Give the web service a name (in my example below I called it WebWeather). Then all you need to do is import the service e.g
Code:
Imports WebWeather
Then, just create a new instance of it and call the relevant function e.g.
Code:
        Dim wb As New WebWeather.TemperatureService
        Dim s As Single = wb.getTemp(12345)



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
so would the results be displayed in a label control?
 
Not in my example, but you could do if you wanted.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top