I have a textbox with a masked exit extender that appears and works perfectly... until a postback occurs.
The control:
<asp:Label ID="lblWorkstation13" Text="Workstation Name (13):" AssociatedControlID="txtWorkstation13" CssClass="lblLabel" runat="server" />
<asp:TextBox ID="txtWorkstation13" MaxLength="13" Columns="16" AutoPostBack="true" runat="server" />
<asp:RequiredFieldValidator ID="rfvtxtWorkstation13" ControlToValidate="txtWorkstation13" Text="*" CssClass="valid" ErrorMessage="Workstation Name is required" Display="Dynamic" ValidationGroup="Submit" runat="server" />
<ajaxToolkit:MaskedEditExtender ID="meetxtWorkstation13" TargetControlID="txtWorkstation13" Mask="LL\-????\-?????" ClearMaskOnLostFocus="false" ClearTextOnInvalid="false" runat="server" />
<asp:RegularExpressionValidator ID="revtxtWorkstation13" ControlToValidate="txtWorkstation13" Text="!" CssClass="valid" ErrorMessage="Workstation Name must be entered as XX-XXXX-XXXXX" ValidationExpression="^([A-Z]{2})\-([A-Z0-9]{4})\-([A-Z0-9]{5})$" ValidationGroup="Submit" runat="server" />
The desired behavior:
limit input to two cap letters, dash, four cap letters or numbers, dash, five cap letters or numbers.
Before postback, the textbox text appears as AB-NAME-12345 (for example)
After postback, the textbox text appears as AB--NAM-E-123 (for example). The last two characters are truncated, the dashes are added, in addition to those supposed to be there, in the wrong place, and now the control does not validate.
I have installed updated Ajax Control Toolkit, etc. Any assistance would be appreciated.
The control:
<asp:Label ID="lblWorkstation13" Text="Workstation Name (13):" AssociatedControlID="txtWorkstation13" CssClass="lblLabel" runat="server" />
<asp:TextBox ID="txtWorkstation13" MaxLength="13" Columns="16" AutoPostBack="true" runat="server" />
<asp:RequiredFieldValidator ID="rfvtxtWorkstation13" ControlToValidate="txtWorkstation13" Text="*" CssClass="valid" ErrorMessage="Workstation Name is required" Display="Dynamic" ValidationGroup="Submit" runat="server" />
<ajaxToolkit:MaskedEditExtender ID="meetxtWorkstation13" TargetControlID="txtWorkstation13" Mask="LL\-????\-?????" ClearMaskOnLostFocus="false" ClearTextOnInvalid="false" runat="server" />
<asp:RegularExpressionValidator ID="revtxtWorkstation13" ControlToValidate="txtWorkstation13" Text="!" CssClass="valid" ErrorMessage="Workstation Name must be entered as XX-XXXX-XXXXX" ValidationExpression="^([A-Z]{2})\-([A-Z0-9]{4})\-([A-Z0-9]{5})$" ValidationGroup="Submit" runat="server" />
The desired behavior:
limit input to two cap letters, dash, four cap letters or numbers, dash, five cap letters or numbers.
Before postback, the textbox text appears as AB-NAME-12345 (for example)
After postback, the textbox text appears as AB--NAM-E-123 (for example). The last two characters are truncated, the dashes are added, in addition to those supposed to be there, in the wrong place, and now the control does not validate.
I have installed updated Ajax Control Toolkit, etc. Any assistance would be appreciated.