protected void Page_Load(object sender, EventArgs e) { _currencies = Global.Currencies; if (!IsPostBack) { var keys = _currencies.Keys.ToList(); SourceCurrency.DataSource = keys; SourceCurrency.DataBind(); DestinationCurrency.DataSource = keys; DestinationCurrency.DataBind(); SourceCourse.Text = _currencies[SourceCurrency.SelectedValue]; SourceCourse.DataBind(); DestinationCourse.Text = _currencies[DestinationCurrency.SelectedValue]; DestinationCourse.DataBind(); } }
protected void DestinationCurrency_SelectedIndexChanged(object sender, EventArgs e) { DestinationCourse.Text = _currencies[DestinationCurrency.SelectedValue]; DestinationCourse.DataBind(); }