Ashad
Ashad

Reputation: 53

How to get the Latest Currency Exchange Rate in your Asp.net Application

How to get the Latest Currency Exchange Rate in your Asp.net Application.Is there any build-in API for getting the latest exchange rates from the web.

Requirement:

The Requirement is i have one calculated value in Indian Rupee, on selected Currency from a dropdownlist the value should change.

For example if i select USD from dropdownlist the Calculated value should converted to USD. For this i want to use some WebService to get the latest Exchange Rates from the Web.

OnselectedIndexchange event of dropdownlist i want to call the webservice to get data for different World Currencies.

Upvotes: 1

Views: 19699

Answers (3)

Ashad
Ashad

Reputation: 53

Hi Everyone i got the solution for the above Question.

GO to http://webservicex.net, this is providing a WebService for ExchangeRate

Here is the code what i did.

Add service Reference in your Client Application

CurrencyConvertor WebService

Then Create the proxy Object in your Client Application

CurrencyExchange.CurrencyConvertor exchangerate = new CurrencyExchange.CurrencyConvertor();
double exchangevalue;
if (DropDownListcurrencies.SelectedValue == "UAE Dhiram")
{
exchangevalue = exchangerate.ConversionRate(CurrencyExchange.Currency.INR,CurrencyExchange.Currency.AED);
resultuae = result * Convert.ToDecimal(exchangevalue);
}

Upvotes: 1

Karl Anderson
Karl Anderson

Reputation: 34844

There is nothing built into the .NET Framework for getting exchange rates, but you might want to look at a previous StackOverflow question Are there any free foreign exchangex rate web services?

Upvotes: 0

Jakub Konecki
Jakub Konecki

Reputation: 46008

There is no 'build-in' api.

You need to find the provider of such data.

You might want to start with https://openexchangerates.org/

Upvotes: 2

Related Questions