I'm using a currency converter and having some problems passing the variable. Can you take a look to the url please?
protected void btnGoogleApi_Click(object sender, EventArgs e)
{
decimal amount = 0; string fromCurrency; string toCurrency;
amount = decimal.Parse(txtAmount.Text.Trim(), System.Globalization.NumberStyles.Any, CultureInfo.InvariantCulture);
fromCurrency = ddlFrom.SelectedItem.Value;
toCurrency = ddlTo.SelectedItem.Value;
if (amount != 0)
{
WebClient web = new WebClient();
string url = string.Format("https://www.google.com/finance/converter?{0}/{1}/{2}", amount, fromCurrency.ToUpper(), toCurrency.ToUpper());
string response = web.DownloadString(url);
Regex regex = new Regex("rhs: \\\"(\\d*.\\d*)");
decimal rate = System.Convert.ToDecimal(regex.Match(response).Groups[1].Value);
l ...
Go to the complete details ...