I binded to dropdownlist I create Void Method. After this method put in drpKategori_SelectedIndexChanged
private void Elemans()
{
using (Entities medya = new Entities())
{
for (int i = 0; i < example.Rows.Count; i++)
{
DropDownList ddl = (DropDownList)example.Rows[i].Controls[5].FindControl("drpEleman");
ddl.DataSource = medya.Elemanlar.ToList();
ddl.DataTextField = "Pozisyon";
ddl.DataValueField = "ID";
ddl.DataBind();
ddl.Items.Insert(0, new ListItem("Seçiniz", "0"));
}
}
}
protected void drpKategori_SelectedIndexChanged(object sender, EventArgs e)
{
Uruns();
Elemans();
}