I am experiencing an AjaxToolkit calendar display error only in production. Locally, when debugging, this problem does not exist, and the datepicker calendar works fine. All other posts revolve around this Toolkit, which does not work at all. I am worried about why this works in a test, but not in production, since I cannot find the link anywhere in my code that uses ASP.NET ScriptManager.
The section "Site.Master" indicates
<ajaxToolKit:ToolkitScriptManager runat="server"> <Scripts> <%--Framework Scripts--%> <%--<asp:ScriptReference Name="jquery" />--%> <%--<asp:ScriptReference Name="jquery.ui.combined" />--%> <asp:ScriptReference Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site Scripts--%> </Scripts> </ajaxToolKit:ToolkitScriptManager>
This is a page that uses the calendar function and has Site.Master as a MasterPageFile object
<asp:Label ID="DateRangeLabel" runat ="server" Text="Date Range: "></asp:Label> <asp:TextBox ID="DateFrom" runat="server" Width="95px"></asp:TextBox> <ajaxtoolkit:calendarextender ID="Calendarextender" runat="server" TargetControlID="DateFrom" PopupPosition="BottomLeft" Format="MM/dd/yyyy"></ajaxtoolkit:calendarextender> <asp:TextBox ID="DateTo" runat="server" Width="95px"></asp:TextBox> <ajaxtoolkit:calendarextender ID="Calendarextender1" runat="server" TargetControlID="DateTo" PopupPosition="BottomLeft" Format="MM/dd/yyyy"></ajaxtoolkit:calendarextender>
This is part of my web.config file.
<controls> <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /> <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/> </controls>
This is the error that is generated during the production process:
Uncaught Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll. Uncaught TypeError: undefined is not a function MicrosoftAjax.js:6
source share