我正在使用货币转换。我想在下拉变化时显示结果。假设我点击印度它会在标签上印上印度货币。
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;
}
} 我想显示货币值而不是选定的商品值。