If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
What I have is a dropdown box on a asp.net page that when a selectedindexchanged event happens, it will look at sql code that will pull up the appropriate records. What I need to happen is that I pull all taskforces that are assigned to a mission. MY taskforce and mission tables are seperate but missionID is a foregin key in the taskforce table. when i pull up a Mission from the dropdown box it should list all task forces in a datagrid that belong to that mission. For some reason not working. Any Ideas.
Private Sub DDLSADName_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLSADName.SelectedIndexChanged
'Populate the DataGrid based off on what was selected from ddlSADName
Dim SadName As Integer = DDLSADName.SelectedValue
Dim strcommand As String
If SadName <> 0 Then
strcommand = "select inttaskForceId from tblTaskForce where inttaskforceid = " & SadName & " order by inttaskforceid "
'retireve value from database according to selected item
myDataTable = getData(sql)
myDataGrid.DataSource = myDataTable
myDataGrid.DataBind()