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