i have a problem in dropdown :suppose i select id from dropdown then i want name of the employee is displayed matched with that id is displayed in textbox : i have use the following code
con = New SqlConnection(constr)
adpt = New SqlDataAdapter("select * from reg where f_name='" + DropDownList1.SelectedItem.Text.ToString + "' ", con)
ds = New DataSet
adpt.Fill(ds)
If ds.Tables(0).Rows.Count - 1 >= 0 Then
TextBox1.Text = ds.Tables(0).Rows(0).Item(11)
End If