Hiyee,I was trying to use the web service for currency rate to get the rate, althought I have already add web reference to["http://www.webservicex.net/CurrencyConvertor.asmx"] but I still do not know how to retrieve it from there. I'm using asp.net vb. Thanks!...
A:
If you are using Visual Studio then you can simply right-click your project and choose "add service reference" to your project specifying "http://www.webservicex.net/CurrencyConvertor.asmx" as address and then add code like this
Dim client = New CurrencyConvertorSoapClient()
Dim result = client.ConversionRate(Currency.EUR, Currency.USD)
Console.WriteLine(result)
dh
2010-02-08 07:51:50
oh, but where to put those code? Sorry for asking this question, quite new with this.
tohru
2010-02-08 07:57:45
in the place where you need the conversion rate, I'm not sure where it is in your project
dh
2010-02-08 08:00:13
oh, but there's error. The currencyconvertorysoapcliekt is not declare...Is it I missed out something?
tohru
2010-02-08 08:15:58
I think you are missing the namespace import likeImports MyProject.CurrencyConvertorService
dh
2010-02-08 08:25:37