It sounds like we have the same problem. I had a page with databound controls and a ModalPopupExtender that worked fine before the Oct. 21 beta 1, but now the databound controls disappear as soon as the modal popup displays -- in IE 6. It works perfectly in Firefox 1.5.0.7. Alessandro, what browser are you using?
Here is a simple example. It has a listbox, populated from the code behind, and a button that causes a modal popup to display via the code-behind page. Am I doing something wrong, or is this a new bug in AJAX?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NakedPage.aspx.cs" Inherits="Director.Web.NakedPage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager id="ScriptManager1" runat="server" EnablePartialRendering="true" />
<asp:UpdatePanel id="testPanelA" runat="server" updatemode="conditional">
<ContentTemplate>
<asp:Button ID="ButtonA" runat="server" Text="Button A" OnClick="btnA_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostbackTrigger ControlID="ButtonA" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel id="testExtenderPanelA" runat="server" updatemode="conditional">
<ContentTemplate>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderA" runat="server" BackgroundCssClass="modalBackground"
PopupControlID="panelA" TargetControlID="FakeTargetA"/>
<asp:Button ID="FakeTargetA" runat="server" Style="display: none;" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostbackTrigger ControlID="ButtonA" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="updPanelA" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="panelA" BorderColor="Green" BorderStyle="Solid" BorderWidth="1" BackColor="#ffcc66" runat="server" Style="display: none; width:80px;">
This is Panel <b>A</b>.
<asp:Button ID="btnYesPanelA" Text="Yes" runat="server" OnClick="btnYesPanelA_Click" />
<asp:Button ID="btnClosePanelA" Text="Cancel" runat="server" OnClick="btnClosePanelA_Click" />
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostbackTrigger ControlID="ButtonA" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel id="databoundControls" runat="server" updatemode="always" RenderMode="inline">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label that appears before the listbox"></asp:Label><br />
<asp:ListBox ID="lstDances" runat="server" SelectionMode="Multiple" CssClass="inputMedium" AutoPostBack="false"></asp:ListBox>
<br /><asp:Label ID="Label2" runat="server" Text="Label that appears b> the listbox"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostbackTrigger ControlID="FakeTargetA" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</form>
</body>
</html>
//.........and the code behind..........
using System;
using System.Collections;
namespace Director.Web
{
public partial class NakedPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PopulateDancesList();
}
}
private void PopulateDancesList()
{
ArrayList arrList = new ArrayList();
arrList.Add("An Rince Mor");
arrList.Add("Eight Hand Reel");
arrList.Add("High Cauled Cap");
arrList.Add("Seige of Carrick");
lstDances.DataSource = arrList;
lstDances.DataBind();
}
protected void btnA_Click(object sender, EventArgs e)
{
ModalPopupExtenderA.Show();
}
protected void btnYesPanelA_Click(object sender, EventArgs e)
{
//Do stuff
}
protected void btnClosePanelA_Click(object sender, EventArgs e)
{
//Do some work
ModalPopupExtenderA.Hide();
}
}
}