MaskedEditExtender works fine when user enters a value then exits the textbox.
However, I have a situation where a textbox is filled by code:
PhoneTextbox.Text = "6105551234" (value found in database, but is user editable)
When the textbox is displayed it is blank! Am I missing something?
Here is the Textbox definition:
<asp:TextBox ID="PhoneTextBox" runat="server" MaxLength="10" Columns="13" Visible="False"> </asp:TextBox>
<cc1:MaskedEditExtender ID="PhoneMaskedEdit" runat="server" Enabled="True" Mask="(999) 999-9999"
MaskType="Number" TargetControlID="PhoneTextBox" CultureAMPMPlaceholder=""
CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
ClearTextOnInvalid="false" >
Please help.
Thank you.
Comments: ___but I can submit a few examples of my project's use of MaskedEditExtender___ It would be great and will really help us in resolving this problem faster. ___Which method names do you think are being used that are wrong? (i.e., what should I be searching for?)___ It is hard to say which of the methods you are using are wrong. Take into account that in AJAX Control Toolkit, old method names were used, like get_Mask and set_Mask (in MaskedEditExtender.js). These names were renamed, preserving old methods and the console warning message output. Now it will be correct to use the get_mask and set_mask functions. See the example (from MaskedEditExtender.js): ``` JS get_mask: function() { if(this._maskConv == "" && this._mask != "") this._convertMask(); return this._maskConv; }, set_mask: function(value) { this._mask = value; this.raisePropertyChanged('mask'); }, get_Mask: function() { Sys.Extended.Deprecated("get_Mask()", "get_mask()"); return this.get_mask(); }, set_Mask: function(value) { Sys.Extended.Deprecated("set_Mask(value)", "set_mask(value)"); this.set_mask(value); } ```
However, I have a situation where a textbox is filled by code:
PhoneTextbox.Text = "6105551234" (value found in database, but is user editable)
When the textbox is displayed it is blank! Am I missing something?
Here is the Textbox definition:
<asp:TextBox ID="PhoneTextBox" runat="server" MaxLength="10" Columns="13" Visible="False"> </asp:TextBox>
<cc1:MaskedEditExtender ID="PhoneMaskedEdit" runat="server" Enabled="True" Mask="(999) 999-9999"
MaskType="Number" TargetControlID="PhoneTextBox" CultureAMPMPlaceholder=""
CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
ClearTextOnInvalid="false" >
Please help.
Thank you.
Comments: ___but I can submit a few examples of my project's use of MaskedEditExtender___ It would be great and will really help us in resolving this problem faster. ___Which method names do you think are being used that are wrong? (i.e., what should I be searching for?)___ It is hard to say which of the methods you are using are wrong. Take into account that in AJAX Control Toolkit, old method names were used, like get_Mask and set_Mask (in MaskedEditExtender.js). These names were renamed, preserving old methods and the console warning message output. Now it will be correct to use the get_mask and set_mask functions. See the example (from MaskedEditExtender.js): ``` JS get_mask: function() { if(this._maskConv == "" && this._mask != "") this._convertMask(); return this._maskConv; }, set_mask: function(value) { this._mask = value; this.raisePropertyChanged('mask'); }, get_Mask: function() { Sys.Extended.Deprecated("get_Mask()", "get_mask()"); return this.get_mask(); }, set_Mask: function(value) { Sys.Extended.Deprecated("set_Mask(value)", "set_mask(value)"); this.set_mask(value); } ```