0

我正在使用货币转换。我想在下拉更改中显示结果。假设我点击印度,它会在标签上显示印度货币。

protected void DdlFromCurrency_SelectedIndexChanged(object sender, EventArgs e)
{
    string Result = null;
    string url;

    //Call the web service to get the exchange rate for the two currencies selected by the user 
    url = "http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=" + DdlFromCurrency.SelectedValue + "&ToCurrency=" + DdlToCurrency.SelectedValue + "";
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader Stream = new StreamReader(response.GetResponseStream());
    XmlDocument doc = new XmlDocument();
    Result = Stream.ReadToEnd();
    doc.LoadXml(Result);
    shw_courenct.Text = DdlFromCurrency.SelectedValue;
}

我想显示货币价值而不是所选项目的价值。

4

0 回答 0