0

I have included following webservice in my project

http://www.webservicex.net/CurrencyConvertor.asmx

There i got a function as ConversionRate() which takes parameters as follws

double Rate;
CurrencyConvertor ccs = new CurrencyConvertor();
Rate= ccs.ConversionRate(Currency.USD, Currency.INR);
lblResult.text=Rate.toString();

It works fine but, My application contains 2 textboxes where i want to manually show the conversion rates

I want to do as follows

Rate= ccs.ConversionRate(txtFromCurrency.text, txtToCurrency.text);
lblResult.text=Rate.toString();

so that application should atomatically convert rates and show in the lable

but ConversionRate() takes arguments as Currency.(Name of Currency)

Is there any method to send these textbox parameters to the function?

Edited by __avd: For easy readability, always wrap programming code within posts in [code] (code blocks)

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by vaibhavd
0

What were you planning to put in your textboxes?

As you said, the method ConversionRate takes two numeric arguments representing each country.

0

From all 2 text boxes i wanted country and in the lable i wanted the currency rate as follows

txtbox1 USD
txtbox2 INR

On submit

Lable 45.0

which is solved by typecasting the class Currency sense it was ENUM
i have type cast it using ENUM and problem solved....

Thanks,
Vaibhav Deshpande

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.