russellmunday
Technical User
The dropdown lists are named
Divisionddl
Kitddl
Private Sub kitddl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kitddl.SelectedIndexChanged
' code here shows the visual in the picture box and sets the price
Image1.ImageUrl = ("c: \" & kitddl.SelectedItem.Text & "visual.jpg")
Select Case kitddl.SelectedItem.Text
Case "GBCE006", "GBSM007", "GBSMT007"
pricelbl.Text = "888.00"
Case "GBSM008", "GBSMT008", "GBCE007"
pricelbl.Text = "789.00"
Case "GBCE008", "GBSM010", "GBSMT010", "GBSM009", "GBSMT009"
pricelbl.Text = "99.00"
Case "GBCE001", "GBSM002", "GBSMT002", "GBCE002", "GBSM001", "GBSMT001"
pricelbl.Text = "980.00"
Case "GBSM004", "GBSMT004"
pricelbl.Text = "2000.00"
Case "GBSM003", "GBSMT003", "GBCE003"
pricelbl.Text = "800.00"
Case "GBSM005", "GBSMT005", "GBCE004", "GBCE005", "GBSM006", "GBSMT006"
pricelbl.Text = "500.00"
End Select
The picture displayes fine but the pricebl does not
The second part of the below writes the information to a table the problem is that only the first character is written to the kit column.
Private Sub confirmcmd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles confirmcmd.Click
' code to validate form and send information to conformation page
Call wnum() ‘ writes a number to a dat file for later use
'save information to database
Dim strkit As String = kitddl.SelectedItem.Text
SqlCmd1.Parameters("@qty").Value = qtytxt.Text
SqlCmd1.Parameters("@name").Value = nametxt.Text
SqlCmd1.Parameters("@address").Value = addrtxt.Text
SqlCmd1.Parameters("@email").Value = mail1txt.Text
SqlCmd1.Parameters("@kit").Value = LBLRUS.Text 'kitddl.SelectedItem.Text
SqlCmd1.Parameters("@price").Value = pricelbl.Text
SqlConnection1.Close()
SqlConnection1.Open()
SqlCmd1.ExecuteNonQuery()
SqlConnection1.Close()
Response.Redirect("confirm.aspx")
End Sub
Divisionddl
Kitddl
Private Sub kitddl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kitddl.SelectedIndexChanged
' code here shows the visual in the picture box and sets the price
Image1.ImageUrl = ("c: \" & kitddl.SelectedItem.Text & "visual.jpg")
Select Case kitddl.SelectedItem.Text
Case "GBCE006", "GBSM007", "GBSMT007"
pricelbl.Text = "888.00"
Case "GBSM008", "GBSMT008", "GBCE007"
pricelbl.Text = "789.00"
Case "GBCE008", "GBSM010", "GBSMT010", "GBSM009", "GBSMT009"
pricelbl.Text = "99.00"
Case "GBCE001", "GBSM002", "GBSMT002", "GBCE002", "GBSM001", "GBSMT001"
pricelbl.Text = "980.00"
Case "GBSM004", "GBSMT004"
pricelbl.Text = "2000.00"
Case "GBSM003", "GBSMT003", "GBCE003"
pricelbl.Text = "800.00"
Case "GBSM005", "GBSMT005", "GBCE004", "GBCE005", "GBSM006", "GBSMT006"
pricelbl.Text = "500.00"
End Select
The picture displayes fine but the pricebl does not
The second part of the below writes the information to a table the problem is that only the first character is written to the kit column.
Private Sub confirmcmd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles confirmcmd.Click
' code to validate form and send information to conformation page
Call wnum() ‘ writes a number to a dat file for later use
'save information to database
Dim strkit As String = kitddl.SelectedItem.Text
SqlCmd1.Parameters("@qty").Value = qtytxt.Text
SqlCmd1.Parameters("@name").Value = nametxt.Text
SqlCmd1.Parameters("@address").Value = addrtxt.Text
SqlCmd1.Parameters("@email").Value = mail1txt.Text
SqlCmd1.Parameters("@kit").Value = LBLRUS.Text 'kitddl.SelectedItem.Text
SqlCmd1.Parameters("@price").Value = pricelbl.Text
SqlConnection1.Close()
SqlConnection1.Open()
SqlCmd1.ExecuteNonQuery()
SqlConnection1.Close()
Response.Redirect("confirm.aspx")
End Sub