Can't add controls to web page after adding Ajax extendershttp://forums.asp.net/t/1788826.aspx/1?Can+t+add+controls+to+web+page+after+adding+Ajax+extendersThu, 05 Apr 2012 13:53:54 -040017888264914717http://forums.asp.net/p/1788826/4914717.aspx/1?Can+t+add+controls+to+web+page+after+adding+Ajax+extendersCan't add controls to web page after adding Ajax extenders <p>I have an web project that uses Master Pages.&nbsp; I put the Toolkit Script Manager on the master page and the Script Proxy on the content page. I am using Calendar Extenders on the content pages.&nbsp; However, if I try to add a control (ie. label, textbox) after adding the extenders the code-behind does not recognize the new control.&nbsp; I have another application that I have extenders on and I can add controls to the pages.&nbsp; The only difference I can see is the master/content pages.&nbsp; If I take the extenders off but still have the script manager and proxy on the pages I can add controls that are recognized.</p> 2012-04-03T20:11:25-04:004914740http://forums.asp.net/p/1788826/4914740.aspx/1?Re+Can+t+add+controls+to+web+page+after+adding+Ajax+extendersRe: Can't add controls to web page after adding Ajax extenders <p>Please post the related code from your master and content pages. What error are you seeing when you try to add the control?</p> 2012-04-03T20:39:49-04:004916075http://forums.asp.net/p/1788826/4916075.aspx/1?Re+Can+t+add+controls+to+web+page+after+adding+Ajax+extendersRe: Can't add controls to web page after adding Ajax extenders <p><strong>Content Page Heading</strong></p> <p>&lt;%@ Page Language=&quot;vb&quot; AutoEventWireup=&quot;false&quot; MaintainScrollPositionOnPostback=&quot;true&quot; MasterPageFile=&quot;~/Site2.Master&quot; CodeBehind=&quot;WalkIn.aspx.vb&quot; Inherits=&quot;IDATSTest.WalkIn&quot; title=&quot;WalkIn&quot; %&gt;</p> <p>&lt;%@ Register Assembly=&quot;AjaxControlToolkit&quot; Namespace=&quot;AjaxControlToolkit&quot; TagPrefix=&quot;cc2&quot; %&gt;</p> <p>&lt;asp:Content ID=&quot;Content2&quot; ContentPlaceHolderID=&quot;maincontent&quot; runat=&quot;server&quot;&gt;</p> <p>&nbsp;&nbsp;&nbsp; &lt;p&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:ScriptManagerProxy ID=&quot;ScriptManagerProxy1&quot; runat=&quot;server&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/asp:ScriptManagerProxy&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/p&gt;</p> <p>&nbsp;</p> <p><strong>Master Page Heading</strong></p> <p>&lt;%@ Master Language=&quot;VB&quot; AutoEventWireup=&quot;false&quot; CodeBehind=&quot;Site3.master.vb&quot; Inherits=&quot;IDATSTest.Site3&quot; %&gt;</p> <p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br> &lt;%@ Register Assembly=&quot;AjaxControlToolkit&quot; Namespace=&quot;AjaxControlToolkit&quot; TagPrefix=&quot;cc1&quot; %&gt;<br> &lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot; &gt;<br> &lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br> &nbsp;&nbsp;&nbsp; &lt;title&gt;Master2&lt;/title&gt;<br> &nbsp;&nbsp;&nbsp; &lt;meta name=&quot;IDATS&quot; content=&quot;&quot; /&gt;<br> &nbsp;&nbsp;&nbsp; &lt;meta name=&quot;insurance&quot; content=&quot;&quot; /&gt;<br> &nbsp;&nbsp;&nbsp; &lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br> &nbsp;&nbsp;&nbsp; &lt;asp:ContentPlaceHolder ID=&quot;head&quot; runat=&quot;server&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/asp:ContentPlaceHolder&gt;<br> &lt;/head&gt;</p> <p>The message I receive when building is that &lt;controlname&gt; is not declared.&nbsp; The control is not listed in the dropdown control list on the code behind page.</p> 2012-04-04T14:14:35-04:004916082http://forums.asp.net/p/1788826/4916082.aspx/1?Re+Can+t+add+controls+to+web+page+after+adding+Ajax+extendersRe: Can't add controls to web page after adding Ajax extenders <p>Here is the code for the calendar extender:</p> <p>&lt;tr&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td align=&quot;right&quot; height=&quot;35&quot; style=&quot;WIDTH: 215px&quot;&gt;Date Received:&lt;/td&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td style=&quot;WIDTH: 397px; HEIGHT: 32px&quot; align=&quot;left&quot;&gt;&lt;asp:textbox id=&quot;txtDateReceived&quot; runat=&quot;server&quot;&gt;&lt;/asp:textbox&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cc2:CalendarExtender ID=&quot;txtDateReceived_CalendarExtender&quot; runat=&quot;server&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cssclass=&quot;calendarContainer&quot;&nbsp; Enabled=&quot;True&quot; TargetControlID=&quot;txtDateReceived&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/cc2:CalendarExtender&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;nbsp;&lt;asp:requiredfieldvalidator id=&quot;rfvRecdDate&quot; runat=&quot;server&quot;&nbsp; Font-Size=&quot;X-Small&quot; ControlToValidate=&quot;txtDateReceived&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ErrorMessage=&quot;Enter date.&quot;&gt;&lt;/asp:requiredfieldvalidator&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;asp:comparevalidator id=&quot;Comparevalidator2&quot; runat=&quot;server&quot; Font-Size=&quot;X-Small&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlToValidate=&quot;txtDateReceived&quot; ErrorMessage=&quot;Use MM/DD/YYYY format.&quot; Display=&quot;Dynamic&quot; Operator=&quot;DataTypeCheck&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type=&quot;Date&quot;&gt;&lt;/asp:comparevalidator&gt;&lt;/td&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;</p> <p>If I remove the extender, I can add controls and they are recognized.&nbsp; And it's not just the calendar extender, it's any Ajax extender.</p> 2012-04-04T14:17:38-04:004917383http://forums.asp.net/p/1788826/4917383.aspx/1?Re+Can+t+add+controls+to+web+page+after+adding+Ajax+extendersRe: Can't add controls to web page after adding Ajax extenders <p>Hi,</p> <p>Make sure you install the correct version of the AjaxControlToolkit:</p> <p>Version 3.0.20229 2008-02-29 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 and Visual Studio 2008.</p> <p>Version 1.0.20229 You can also download the Toolkit for .NET Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.</p> <p>Version 3.0.40412</p> <p>April 12, 2010 release of the AJAX Control Toolkit for ASP.NET 3.5 Service Pack 1 and Visual Studio 2008 SP1.&nbsp;&nbsp;</p> <p>Version 4.1.51116.0</p> <p>Nov 16 2011 release of the AJAX Control Toolkit for ASP.NET 4.0 and Visual Studio 2010</p> <p>Then you could add the Ajax Control Toolkit to the VS Toolbox step by step at:<a href="http://www.asp.net/ajaxlibrary/act.ashx">http://www.asp.net/ajaxlibrary/act.ashx</a>.</p> 2012-04-05T07:37:19-04:004918207http://forums.asp.net/p/1788826/4918207.aspx/1?Re+Can+t+add+controls+to+web+page+after+adding+Ajax+extendersRe: Can't add controls to web page after adding Ajax extenders <p>Thanks. this was my problem. I had the wrong version of the toolkit for VS 2008 3.5.</p> 2012-04-05T13:53:54-04:00