I was detoured by other things this morning, and just got around to this. Here's a simple site with a custom control that shows the problem.
As is, clicking the "Trigger Error" button will, uh, trigger the error. If you remove the UpdatePanel from the page, it all works fine.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using AtlasControlToolkit;
namespace AtlasPopupSite
{
/// <summary>
/// Summary description for TestControl
/// </summary>
public class TestControl : CompositeControl
{
protected override void CreateChildControls()
{
this.Controls.Clear();
Label lab = new Label();
lab.Text = "Test Popup ";
lab.ID = "lab";
this.Controls.Add(lab);
TextBox tb = new TextBox();
tb.ID = "textbox";
this.Controls.Add(tb);
Button but = new Button();
but.Text = "Trigger Error";
but.ID = "but";
this.Controls.Add(but);
Panel popupPanel = new Panel();
popupPanel.ID = "popuppanel";
popupPanel.CssClass = "PopupPanel";
this.Controls.Add(popupPanel);
ListBox list = new ListBox();
list.ID = "listbox";
list.Items.Add(new ListItem("test, test"));
list.Items.Add(new ListItem("popup", "popup"));
popupPanel.Controls.Add(list);
PopupControlProperties popupProps = new PopupControlProperties();
popupProps.TargetControlID = "textbox";
popupProps.PopupControlID = "listbox";
popupProps.Position = PopupControlPopupPosition.Bottom;
PopupControlExtender popupExt = new PopupControlExtender();
popupExt.TargetProperties.Add(popupProps);
popupExt.ID = "popupext";
this.Controls.Add(popupExt);
}
}
}
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Namespace="AtlasPopupSite" TagPrefix="tc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.PopupPanel {visibility:hidden}
</style>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
<asp:Panel ID="toppanel" runat="server">
<atlas:UpdatePanel ID="up1" runat="server" Mode="Always">
<ContentTemplate>
<tc:TestControl runat="server" id="test" />
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel>
</form>
</body>
</html>