i am trying to load data in dropdownlist but it is not getting load and coming this (System.data.datarow)
here is my c# Code
private void LoadDataintoComboBox()
{
CateogryComboBox.DataSource = GetComboBoxData(3);
ProductComboBox.DataSource = GetComboBoxData(2);
}
private DataTable GetComboBoxData(int listTypeID)
{
DataTable dtrecordCB = new DataTable();
using (SqlConnection con = new SqlConnection(ApplicationSetting.ConnectionString()))
{
using (SqlCommand cmd = new SqlCommand("usp_ListTypeData_LoadDataIntoCombobox", con))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@listTypeID", listTypeID);
con.Open();
SqlDataReader sdr = cmd.ExecuteReader();
dtrecordCB.Load(sdr);
}
return dtrecordCB;
}
}
please guide