我正在尝试添加一个Label来显示在RadioButtonList,CheckBoxList和DropDownList中所做选择的运行总值。如何将其添加到我当前的代码中?
Protected Sub rblPhone_SelectedIndexChanged(sender As Object, e As EventArgs) Handles rblPhone.SelectedIndexChanged
lblPhonePrice.Text = "$" & rblPhone.SelectedItem.Value
End Sub
Protected Sub cblAccessories_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cblAccessories.SelectedIndexChanged
Dim sumList As Integer = 0
For Each accessory In cblAccessories.Items
If accessory.Selected Then
sumList = sumList + accessory.value
End If
Next
lblAccPrice.Text = "$" & sumList
End Sub
Protected Sub ddlPlan_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlPlan.SelectedIndexChanged
lblPlanPrice.Text = "$" & ddlPlan.SelectedItem.Value
End Sub