大家好 如何在Asp应用程序中获取最新货币汇率。是否有任何内置从网上获取最新汇率的API。 要求: 要求是我有印度卢比的一个计算值,从下拉列表中选择的货币值应该更改。 例如,如果我从下拉列表中选择美元,则计算值应转换为美元。 为此,我想使用一些WebService从网上获取最新的汇率。 我想调用的下拉列表的OnselectedIndexchange事件用于获取不同世界货币数据的Web服务。
Hi All How to get the Latest Currency Exchange Rate in your Asp 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.
推荐答案openexchangerates / documentation [ ^ ]
大家好我得到了上述问题的解决方案。 转到webservicex,这是为ExchangeRate提供WebService 以下是我所做的代码。 在客户端应用程序中添加服务参考 www.webservicex/CurrencyConvertor.asmx 然后在客户端应用程序中创建代理对象 Hi Everyone i got the solution for the above Question. GO to webservicex, this is providing a WebService for ExchangeRate Here is the code what i did. Add service Reference in your Client Application www.webservicex/CurrencyConvertor.asmx 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); }
更多推荐
如何在您的Asp.net应用程序中获得最新的货币汇率
发布评论