0
我被困在轉換數據列表中的速率。我的頁面包含一個下拉列表(貨幣轉換器),一個數據列表 - 裏面包含標籤中袋子的價格。現在我使用dropdownlist.selectedIndexchange通過數據列表循環以獲取數據
Protected Sub ddl_rate_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl_rate.SelectedIndexChanged
Dim lbl_rate As Label = roomList.Items.Item(0).FindControl("lbl_rate")
Dim a As Integer = Convert.ToInt32(lbl_rate.Text)
If ddl_rate.Text = "Australia Dollars (AUD)" Then
Dim b As Integer = (a * 0.8029)
lbl_rate.Text = b.ToString()
ElseIf ddl_rate.Text = "Brazil Reais (BRL)" Then
Dim b As Integer = (a * 1.3024)
lbl_rate.Text = b.ToString()
End If
儘管它確實轉換了費率,但它只轉換了第一行。 有什麼建議嗎?