I was attempting to use the PopupControl Extender the other day, to create myself a web user control for colour selection.
Here is what I ended up creating..
When a user clicked on one of the link buttons it performed a postback, problem was it was doing a full postback and closing the popup window.
Solution: When creating your controls dynamically to exist in your panel to be displayed by the popup extender you need to register them with the UpdatePanel triggers collection like so:
LinkButton btnColour = new LinkButton(); ... setup you link button btnColour.ID = colurHexCode; // colurHexCode string variable containing the current colour I am setting as the backgroud AsyncPostBackTrigger trigger = new AsyncPostBackTrigger(); trigger.ControlID = btnColour.ID; UpdatePanel1.Triggers.Add(trigger);
This forces the dynamic control to be included in the update panel and when clicked only performs a partial update panel postback.