Hello,
You need to Override OnLoad Event for Added Dynemic Update Panel.
Added Update Panel Dynemic on OnLoad Event.
OverRide OnLoad Event as following way
Declare DropDownList and assign to Update Panel as following way
DropDownList ddFindFriendAction;
protected override void OnLoad(EventArgs e)
{
foreach (DataRow askAsk in usr.GetDataByName(txtFindFriendName.Text.ToString()).Rows)
{
ddFindFriendAction = new DropDownList();
ddFindFriendAction.ID = "ddFindFriendAction" + askAsk["idUSer"].ToString();
ddFindFriendAction.CssClass = "ddFindFriendAction";
ddFindFriendAction.AutoPostBack = true;
ddFindFriendAction.SelectedIndexChanged += new EventHandler(ddFindFriendAction_SelectedIndexChanged);
}
}
void ddFindFriendAction_SelectedIndexChanged(object sender, EventArgs e)
{
string a = ddFindFriendAction.SelectedValue;
}
Hope this helpful!
Thanks