You are on page 1of 2

Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList2.SelectedIndexChanged If DropDownList2.SelectedItem.Value = "Samsung" Then Label1.Visible = True ListBox1.

Visible = True Else Label1.Visible = False ListBox1.Visible = False End If If DropDownList2.SelectedItem.Value = "ViewSonic" Then Label2.Visible = True ListBox2.Visible = True Else Label2.Visible = False ListBox2.Visible = False End If End Sub Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged If ListBox1.SelectedItem.Text = "Monitor" Then p = 3500 total = p End If If ListBox1.SelectedItem.Text = "Mouse" Then p = 250 total = p End If If ListBox1.SelectedItem.Text = "Monitor" Or ListBox1.SelectedItem.Text = "Mouse" Then Label5.Visible = True Else Label5.Visible = False End If total = p Label5.Text = "Total: " & total End Sub Protected Sub ListBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged If ListBox2.SelectedItem.Text = "Monitor" Then p = 3600 total = p End If If ListBox2.SelectedItem.Text = "Mouse" Then p = 325 total = p End If

If ListBox2.SelectedItem.Text = "Monitor" Or ListBox2.SelectedItem.Text = "Mouse" Then Label5.Visible = True Else Label5.Visible = False End If total = p Label5.Text = "Total: " & total End Sub Protected Sub ddlcategory_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlcategory.SelectedIndexChanged Dim p, x, total As Integer Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged If DropDownList1.SelectedItem.Value = "Monitor" Or DropDownList1.SelectedItem.Value = "Mouse" Or DropDownList1.SelectedItem.Value = "Keyboard" Or DropDownList1.SelectedItem.Value = "System Unit" Or DropDownList1.SelectedItem.Value = "Motherboard" Or DropDownList1.SelectedItem.Value = "Speaker" Then DropDownList2.Visible = True Else DropDownList2.Visible = False End If End Sub End Sub End Class

You might also like