So, I'm using ASP with a VB code behind. I have text boxes that are supposed to appear one by one only if the there is a location number in the preceding text box. I had that function working perfectly, but I needed to add a MaskedEditExtender in the place, well now upon exit the mask will not disappear. To make this more clear, I want the mask to appear when number is there and stored in the database that way.

This is part of the front end code

<asp:Label ID="label18" runat="server" Text="Number 2:"></asp:Label><br />
<asp:MaskedEditExtender  runat="server" ID="MaskedEditExtender1" AcceptAMPM="True" Mask="99-99-99-999-999" MaskType="number" ClearMaskOnLostFocus="false" TargetControlID="LocNum2">
                </asp:MaskedEditExtender>
<asp:TextBox ID="LocNum2"   MaxLength="16" AutoPostBack="true" class="txtboxwidth" runat="server"></asp:TextBox>
<asp:Label ID="label19" runat="server" Text="Number 3:"></asp:Label>
<asp:MaskedEditExtender  runat="server" ID="MaskedEditExtender2" AcceptAMPM="True" Mask="99-99-99-999-999" MaskType="number" TargetControlID="LocNum3">
                </asp:MaskedEditExtender>
<asp:TextBox ID="LocNum3"  MaxLength="16" AutoPostBack="true"  class="txtboxwidth" runat="server"></asp:TextBox>

Here is part of the back end code

If LocNum2.Text = "" Then
            MaskedEditExtender1.ClearMaskOnLostFocus = True
        End If
        If LocNum2.Text = "__-__-__-___-___" Then
            MaskedEditExtender1.ClearMaskOnLostFocus = True
        End If
        If LocNum2.Text <> "" Then
            MaskedEditExtender1.ClearMaskOnLostFocus = False
            label19.Visible = True
            LocNum3.Visible = True
        End If

I'm trying to fix the problem where the mask, "__-__-__-___-___" is not picked up by the if statement. By default with ClearMaskOnLostFocus is set to False. I'm a rather bit puzzled. Any suggestions would be great!