I am populating dropdown into gridview.when i am running application, in dropdown it shows me this data
System.Data.Datarawview.
Here I have pasted my code :
public void FindControlInGV()
{
foreach (GridViewRow gvr in gvPopulate.Rows)
{
SqlDataAdapter ad = new SqlDataAdapter("select B_Element from Test_Table", con);
DataSet ds = new DataSet();
ad.Fill(ds, "Test_Table");
DropDownList ddlSelect = new DropDownList();
ddlSelect = (DropDownList)gvr.Cells[0].FindControl("ddlPopulate");
ddlSelect.DataSource = ds;
ddlSelect.DataBind();
}
//}
}
I am new to asp.net pls help me out.