Author: asad_black | Posted on: 2/1/2009 10:23:42 AM | Views : 305

 hi i have a field of demand number extract from the database and its datatype is number.
 and another field is item which is also extract from the database and its datatype is text...!
 i want to select a demand number from the dropdownlist then item change automatically in dropdownlist with respect to demand number.
 this is my code:
 
 Protected Sub DemandDropDownList_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DemandDropDownList.SelectedIndexChanged
        commandtext1 = "Select itemdesc from purchaserequistion where demand='" + DemandDropDownList.SelectedValue + "'"
        oledbconnection = New OleDbConnection(con)
        oledbconnection.Open()
        ItemDataSource.SelectCommand = commandtext ...

Go to the complete details ...