0

我正在尝试添加一个标签以显示 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
4

0 回答 0