Correspondingly the AjaxControlToolkitTextboxWrapper class that is crucial for the technique described in this article is now called Sys.Extended.UI.TextBoxWrapper and this is a breaking change. Most if its methods haven't been renamed and this is a good news however the new way of using the wrapper has been introduced.
Below are the code examples demonstrating how to write the code correctly with the new version of the ACT.
First we need to acquire an instance of the Sys.Extended.UI.TextBoxWrapper class for our textbox control and this is the newly introduced technique compared to the previous version of the ACT:
// get the instance of a textbox element var textBox = $get(textBoxId); // use the get_Wrapper static method of the TextBoxWrapper class to get the instance of the wrapper for the textbox var wrapper = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(textBox);
In the code above first I assume that the ACT is present so I don't have to check that Sys.Extended.UI namespace is defined. Secondly the code above is safe even if the textbox is not watermarked: the get_Wrapper static method will always return the instance of the TextBoxWrapper; the new instance will be created if the textbox is not watermarked.
Now we can set or get a value of the textbox using the instance of the TextBoxWrapper:
// get the textbox value var oldValue = wrapper.get_Value(); // set the textbox value wrapper.set_Value(newVlaue);