I want to add a people picker to my webpart according to an event. To make it simple I want to add it when I click a button. The code would be very simple, like this:
protected void Button1_Click(object sender, EventArgs e)
{
PeopleEditor pe = new PeopleEditor();
pe.ID = "CCC";
this.Controls.Add(pe);
}
The People Editor suddendly appears but doesn't work as expected: when I try to use it, it raised an exception:
The target 'ctl00$m$g_bbed8d1e_42f3_4288_b8ac_ba7c95856727$ctl00$CCC' for the callback could not be found or did not implement ICallbackEventHandler.
There is something I had to register to make this work? I had to handle N people picker in my page so I cannot create it invisible and then make it visibile..
Any suggestion? Thank you!
