We call GetWrapper of the element in all places. See TextBoxWatermark for example. Write a private function inside each behavior that caches the wrapper instance. (When doing so, be aware that property setters are called before the behavior's Initialize method.) Example code:
this._wrapper = null;
...
get_wrapper : function() {
if (!this._wrapper) {
this._wrapper = AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());
}
return this._wrapper;
}
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please file a new issue.
this._wrapper = null;
...
get_wrapper : function() {
if (!this._wrapper) {
this._wrapper = AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());
}
return this._wrapper;
}
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please file a new issue.