Hello,
I am using ASP.NET AJAX Control Toolkit with my .Net 4.0 ASP.NET application. I did everything that was mentioned concerning the installation (downloaded the 4.0 binary ZIP file (v 4.1.7.0123), unblocked it, uncompressed it, and used the AjaxControlToolkit.dll as a project resource and used it to create a new area in my toolbox). I then dragged a tab control to my page. The page now has
<%@RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="act" %>
listed near the top of the page and within my body I am defining the tab control simply as
<act:TabContainer ID="TabContainer1" runat="server">
<act:TabPanel ID="TabPanel1" runat="server" HeaderText="Red Flower">
<ContentTemplate> Tab 1 Content </ContentTemplate>
</act:TabPanel>
</act:TabContainer>
When I try to run my app I get the error "The Controls collection cannot be modified because the control contains code blocks". I know it is referring to ajax control toolkit becuase it I delete the TabContainer/TabPanel, I don't get the error. I tried adding another Ajax Control Toolkit item but I got the same error. Does anyone know why I am getting this error? I myself am not defining any <% %> code blocks so I have to believe it is in the toolkit API.
UPDATE: I am running this page as a web form within a master page. The script manager is in the master. If I just create a stand-alone page where I register the assembly and add the script manager, it appears to work. But if I have my page within a master page, it doesn't.
Any clues would be greatly appreciated - Peter