Hi Sir. I would like to know, how can I manipulate 1 dropdownlist over another dropdownlist.
Example:
I have a product table, which contain the type of the product (eg: FTW, APP, EQP)
By choosing the product type, another dropdownlist will give the products under the selected type.
Protected Sub ddlDivision_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddlDivision.SelectedIndexChanged
'***************************
'After product type been selected.
'***************************
'use appilication connection
str_sql_user_select = "SELECT article_no, item_desc, brand_name, age_grp_name, cat_name, sub_cat_name FROM view_produk_details WHERE div_name='" & ddlDivision.SelectedItem.Text & "'"
Dim myConnection As SqlConnection = New SqlConnection(dbpath)
comUserSelect = New SqlCommand(str_sql_user_select, myConnection)
comUserSelect.Connection.Open()
myreader = comUserSelect.ExecuteReader
If myreader.Read = True Then
ddlArticleNo.Text = myreader(0) 'I assign it like this, but the output is not as i want it to be, as i mention.
descLabel.Text = myreader(1)
brandLabel.Text = myreader(2)
ageLabel.Text = myreader(3)
catLabel.Text = myreader(4)
subCatLabel.Text = myreader(5)
End If
myConnection.Close()
End Sub
Thanks for the help. :)