Public Sub PositionBind()
Dim sqlQuery = "SELECT * FROM WorkPosition WHERE position = '" & ddPosition.SelectedValue & "'"
Dim da As New SqlDataAdapter(sqlQuery, condb)
da.Fill(ds, "select")
dt = ds.Tables("select").Rows(0)
ddPosition.SelectedValue = dt("position")
End Sub
Public Sub DepartmentBind()
Dim sqlQuery = "SELECT * FROM tbDepartment WHERE DeptName = '" & ddlDepartment.SelectedValue & "'"
Dim da As New SqlDataAdapter(sqlQuery, condb)
da.Fill(ds, "select")
dt = ds.Tables("select").Rows(0)
ddlDepartment.SelectedValue = dt("DeptName")
End Sub
Protected Sub ddPosition_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles ddPosition.SelectedIndexChanged
DepartmentBind()
End Sub