Hi ,
Ihave modified the code as below...but now it is saying : There is no row at position 0.
Dim sqlcmd As String = ("select * From DP_Table Where P_id = '" & DropDownList1.SelectedItem.Value & "'")Dim ad As New SqlDataAdapter(sqlcmd, cn)
Dim ds As New DataSetad.Fill(ds, "DP_Table")
TB1.Text = ds.Tables("DP_Table").Rows(0)("P_id").ToStringTB2.Text = ds.Tables("DP_Table").Rows(0)("P_Name").ToString
Plz help