Hi,
I have also upgraded to 15.1. And now I receive the following error: _“Unable to get property 'click' of undefined or null reference”_. Actually I can go further, but the CSS of my custom ajax extender doesn’t work. And I get the next error: _"0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'registerComponent_'". This referring to a line in my js-file of custom extender: “window.Sys.registerComponent(XXX.ContentCounterBehavior);”.
Please help, somebody! Thanks a lot.
Comments: Thanks for your comment MikhailTymchukDX! I don’t know if I can reproduce this error through a sample site. But I try to picture it: Before the upgrading to 15.1, I had the version 4.1 of ajax toolkit. Everything worked great. There are several custom made ajax-extenders which my site uses via a separate project. I used NuGet. I've got references: AjaxConrolToolkit, AjaxConrolToolkitHtmlEditorSanitizer and ajaxConrolToolkitStaticResources. But now all of my extenders gives the same errors. Below are a part of my files of Extender-Project: The CS file: using System.Web.UI; using System.Web.UI.WebControls; using AjaxControlToolkit; [assembly: WebResource("ContentCounter.ContentCounterBehavior.js","text/javascript")] [assembly: WebResource("ContentCounter.ContentCounterBehavior.debug.js","text/javascript")] [assembly: WebResource("ContentCounter.ContentCounterBehavior.css","text/css", PerformSubstitution = true)] namespace IPPControlExtenders { [RequiredScript(typeof(CommonToolkitScripts), 0)] [RequiredScript(typeof(PopupExtender), 1)] [ClientCssResource("ContentCounter.ContentCounterBehavior.css")] [ClientScriptResource("IPPControlExtenders.ContentCounterBehavior", "ContentCounter.ContentCounterBehavior")] [TargetControlType(typeof(TextBox))] public class ContentCounterExtender : AjaxControlToolkit.ExtenderControlBase { [ExtenderControlProperty] [RequiredProperty] public string CountOnly { get { return GetPropertyValue("CountOnly", "false"); } set { SetPropertyValue("CountOnly", value); } } [ExtenderControlProperty] [RequiredProperty] public string SuppressMaximum { get { return GetPropertyValue("SuppressMaximum", "false"); } set { SetPropertyValue("SuppressMaximum", value); } } } } The JS-file: (function () { var scriptName = "ContentCounterBehavior"; function execute() { window.Type.registerNamespace("IPPControlExtenders"); IPPControlExtenders.ContentCounterBehavior = function (element) { IPPControlExtenders.ContentCounterBehavior.initializeBase(this, [element]); this._textbox = window.Sys.Extended.UI.TextBoxWrapper.get_Wrapper(element); this._contentCounterBehavior = null; this._contentCounterPosition = window.Sys.Extended.UI.PositioningMode.BottomLeft; this._contentCounterDiv = null; this._countOnly = false; this._suppressMaximum = false; this._element$delegates = { focus: Function.createDelegate(this, this._element_onfocus), blur: Function.createDelegate(this, this._element_onblur), keyup: Function.createDelegate(this, this._element_onkeyup) }; }; IPPControlExtenders.ContentCounterBehavior.prototype = { initialize: function () { IPPControlExtenders.ContentCounterBehavior.callBaseMethod(this, 'initialize'); var element = this.get_element(); window.$addHandlers(element, this._element$delegates); }, _ensurePopup: function () { if (!this._contentCounterDiv) { var element = this.get_element(); var id = this.get_id(); this._contentCounterDiv = window.$common.createElementFromTemplate({ nodeName: "div", properties: { id: id + "_contentCounterDiv" }, cssClasses: ["ipp__contentCounter"] }, element.parentNode); this._contentCounterBehavior = new window.$create(window.Sys.Extended.UI.PopupBehavior, { parentElement: element }, {}, {}, this._contentCounterDiv); this._contentCounterBehavior.set_positioningMode(this._contentCounterPosition); } }, _displayCounter: function () { var elem = this.get_element(); if (elem.maxLength === 0x7FFFFFFF || elem.maxLength === 0x80000 || elem.maxLength === -1) { this._contentCounterDiv.innerHTML = elem.value.length; } else { if (this._countOnly === true) { if (this._suppressMaximum) this._contentCounterDiv.innerHTML = elem.value.length; else this._contentCounterDiv.innerHTML = elem.value.length + "/" + elem.maxLength; } else { if (this._suppressMaximum) this._contentCounterDiv.innerHTML = elem.maxLength - elem.value.length; else this._contentCounterDiv.innerHTML = elem.maxLength - elem.value.length + "/" + elem.maxLength; } } this.raisePropertyChanged("Text"); }, _element_onkeyup: function () { this._ensurePopup(); this._displayCounter(); }, _element_onfocus: function () { this._ensurePopup(); this.show(); this._displayCounter(); }, _element_onblur: function () { this.hide(); }, show: function () { if (this._contentCounterBehavior) { this._contentCounterBehavior.show(); } }, hide: function () { if (this._contentCounterBehavior) { this._contentCounterBehavior.hide(); } }, get_CountOnly: function () { return this._countOnly; }, set_CountOnly: function (value) { this._countOnly = value.toLowerCase() === 'true'; }, get_SuppressMaximum: function () { return this._suppressMaximum; }, set_SuppressMaximum: function (value) { this._suppressMaximum = value.toLowerCase() === 'true'; }, dispose: function () { var element = this.get_element(); window.$clearHandlers(element); if (this._contentCounterBehavior) { this._contentCounterBehavior.dispose(); this._contentCounterBehavior = null; } } }; IPPControlExtenders.ContentCounterBehavior.registerClass('IPPControlExtenders.ContentCounterBehavior', window.Sys.Extended.UI.BehaviorBase); window.Sys.registerComponent(IPPControlExtenders.ContentCounterBehavior); } if (window.Sys && window.Sys.loader) { window.Sys.loader.registerScript(scriptName, ["ExtendedBase", "ExtendedCommon"], execute); } else { execute(); } })(); The CSS file: .ipp__contentCounter { color: mediumblue; background-color: #d7e4f2; border: solid 1px mediumblue; padding: 2px 6px; font-family: Tahoma; font-size: 8pt; margin-top: 4px ; } And a part of the master page of my main project: <%@ Master Language="C#" AutoEventWireup="true" Inherits="MasterPage" CodeBehind="MasterPage.master.cs" %> <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title></title> <link rel="Stylesheet" href="~/App_Themes/Skins/ParkBase.css" type="text/css" /> <link rel="shortcut icon" href="favicon.ico" /> </head> <body id="masterBody" runat="server" style="background-color: black !important;"> <form id="formMain" name="formMain" runat="server" style="width: 1024px;"> <div class="divHiddenSection"> <asp:ScriptManager ID="scriptManager" runat="server" EnableScriptGlobalization="True" EnableHistory="true" EnablePartialRendering="true" EnablePageMethods="True" ScriptMode="Release" AsyncPostBackTimeout="300" > <Scripts> <asp:ScriptReference Path="~/Scripts/Master.js" /> <asp:ScriptReference Path="~/Scripts/MaskedEditFix.js" /> <asp:ScriptReference Path="~/Scripts/jquery-1.11.0.js" /> <asp:ScriptReference Path="~/Scripts/jquery-1.11.0.min.js" /> </Scripts> </asp:ScriptManager> </div> <table class="master-Table" > .... Thanks for your reply.
I have also upgraded to 15.1. And now I receive the following error: _“Unable to get property 'click' of undefined or null reference”_. Actually I can go further, but the CSS of my custom ajax extender doesn’t work. And I get the next error: _"0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'registerComponent_'". This referring to a line in my js-file of custom extender: “window.Sys.registerComponent(XXX.ContentCounterBehavior);”.
Please help, somebody! Thanks a lot.
Comments: Thanks for your comment MikhailTymchukDX! I don’t know if I can reproduce this error through a sample site. But I try to picture it: Before the upgrading to 15.1, I had the version 4.1 of ajax toolkit. Everything worked great. There are several custom made ajax-extenders which my site uses via a separate project. I used NuGet. I've got references: AjaxConrolToolkit, AjaxConrolToolkitHtmlEditorSanitizer and ajaxConrolToolkitStaticResources. But now all of my extenders gives the same errors. Below are a part of my files of Extender-Project: The CS file: using System.Web.UI; using System.Web.UI.WebControls; using AjaxControlToolkit; [assembly: WebResource("ContentCounter.ContentCounterBehavior.js","text/javascript")] [assembly: WebResource("ContentCounter.ContentCounterBehavior.debug.js","text/javascript")] [assembly: WebResource("ContentCounter.ContentCounterBehavior.css","text/css", PerformSubstitution = true)] namespace IPPControlExtenders { [RequiredScript(typeof(CommonToolkitScripts), 0)] [RequiredScript(typeof(PopupExtender), 1)] [ClientCssResource("ContentCounter.ContentCounterBehavior.css")] [ClientScriptResource("IPPControlExtenders.ContentCounterBehavior", "ContentCounter.ContentCounterBehavior")] [TargetControlType(typeof(TextBox))] public class ContentCounterExtender : AjaxControlToolkit.ExtenderControlBase { [ExtenderControlProperty] [RequiredProperty] public string CountOnly { get { return GetPropertyValue("CountOnly", "false"); } set { SetPropertyValue("CountOnly", value); } } [ExtenderControlProperty] [RequiredProperty] public string SuppressMaximum { get { return GetPropertyValue("SuppressMaximum", "false"); } set { SetPropertyValue("SuppressMaximum", value); } } } } The JS-file: (function () { var scriptName = "ContentCounterBehavior"; function execute() { window.Type.registerNamespace("IPPControlExtenders"); IPPControlExtenders.ContentCounterBehavior = function (element) { IPPControlExtenders.ContentCounterBehavior.initializeBase(this, [element]); this._textbox = window.Sys.Extended.UI.TextBoxWrapper.get_Wrapper(element); this._contentCounterBehavior = null; this._contentCounterPosition = window.Sys.Extended.UI.PositioningMode.BottomLeft; this._contentCounterDiv = null; this._countOnly = false; this._suppressMaximum = false; this._element$delegates = { focus: Function.createDelegate(this, this._element_onfocus), blur: Function.createDelegate(this, this._element_onblur), keyup: Function.createDelegate(this, this._element_onkeyup) }; }; IPPControlExtenders.ContentCounterBehavior.prototype = { initialize: function () { IPPControlExtenders.ContentCounterBehavior.callBaseMethod(this, 'initialize'); var element = this.get_element(); window.$addHandlers(element, this._element$delegates); }, _ensurePopup: function () { if (!this._contentCounterDiv) { var element = this.get_element(); var id = this.get_id(); this._contentCounterDiv = window.$common.createElementFromTemplate({ nodeName: "div", properties: { id: id + "_contentCounterDiv" }, cssClasses: ["ipp__contentCounter"] }, element.parentNode); this._contentCounterBehavior = new window.$create(window.Sys.Extended.UI.PopupBehavior, { parentElement: element }, {}, {}, this._contentCounterDiv); this._contentCounterBehavior.set_positioningMode(this._contentCounterPosition); } }, _displayCounter: function () { var elem = this.get_element(); if (elem.maxLength === 0x7FFFFFFF || elem.maxLength === 0x80000 || elem.maxLength === -1) { this._contentCounterDiv.innerHTML = elem.value.length; } else { if (this._countOnly === true) { if (this._suppressMaximum) this._contentCounterDiv.innerHTML = elem.value.length; else this._contentCounterDiv.innerHTML = elem.value.length + "/" + elem.maxLength; } else { if (this._suppressMaximum) this._contentCounterDiv.innerHTML = elem.maxLength - elem.value.length; else this._contentCounterDiv.innerHTML = elem.maxLength - elem.value.length + "/" + elem.maxLength; } } this.raisePropertyChanged("Text"); }, _element_onkeyup: function () { this._ensurePopup(); this._displayCounter(); }, _element_onfocus: function () { this._ensurePopup(); this.show(); this._displayCounter(); }, _element_onblur: function () { this.hide(); }, show: function () { if (this._contentCounterBehavior) { this._contentCounterBehavior.show(); } }, hide: function () { if (this._contentCounterBehavior) { this._contentCounterBehavior.hide(); } }, get_CountOnly: function () { return this._countOnly; }, set_CountOnly: function (value) { this._countOnly = value.toLowerCase() === 'true'; }, get_SuppressMaximum: function () { return this._suppressMaximum; }, set_SuppressMaximum: function (value) { this._suppressMaximum = value.toLowerCase() === 'true'; }, dispose: function () { var element = this.get_element(); window.$clearHandlers(element); if (this._contentCounterBehavior) { this._contentCounterBehavior.dispose(); this._contentCounterBehavior = null; } } }; IPPControlExtenders.ContentCounterBehavior.registerClass('IPPControlExtenders.ContentCounterBehavior', window.Sys.Extended.UI.BehaviorBase); window.Sys.registerComponent(IPPControlExtenders.ContentCounterBehavior); } if (window.Sys && window.Sys.loader) { window.Sys.loader.registerScript(scriptName, ["ExtendedBase", "ExtendedCommon"], execute); } else { execute(); } })(); The CSS file: .ipp__contentCounter { color: mediumblue; background-color: #d7e4f2; border: solid 1px mediumblue; padding: 2px 6px; font-family: Tahoma; font-size: 8pt; margin-top: 4px ; } And a part of the master page of my main project: <%@ Master Language="C#" AutoEventWireup="true" Inherits="MasterPage" CodeBehind="MasterPage.master.cs" %> <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title></title> <link rel="Stylesheet" href="~/App_Themes/Skins/ParkBase.css" type="text/css" /> <link rel="shortcut icon" href="favicon.ico" /> </head> <body id="masterBody" runat="server" style="background-color: black !important;"> <form id="formMain" name="formMain" runat="server" style="width: 1024px;"> <div class="divHiddenSection"> <asp:ScriptManager ID="scriptManager" runat="server" EnableScriptGlobalization="True" EnableHistory="true" EnablePartialRendering="true" EnablePageMethods="True" ScriptMode="Release" AsyncPostBackTimeout="300" > <Scripts> <asp:ScriptReference Path="~/Scripts/Master.js" /> <asp:ScriptReference Path="~/Scripts/MaskedEditFix.js" /> <asp:ScriptReference Path="~/Scripts/jquery-1.11.0.js" /> <asp:ScriptReference Path="~/Scripts/jquery-1.11.0.min.js" /> </Scripts> </asp:ScriptManager> </div> <table class="master-Table" > .... Thanks for your reply.