Help with validating entries in masked inout box

Posted on 2012-08-21
Last Modified: 2012-08-25

I have several masked input boxes for users to enter numeric data, such

xxx,xxx  xxxx-xx-xxx-xxxx, xx.x

How do I alert the users when they attempt to  leave the control without inputing all the data in the masked input box?

Question by:vcharles
    LVL 9

    Expert Comment

    Hi Victor,

    Consider using AjaxControlToolkit:

    You may use ValidationExpression in MaskedEditValidator to achieve your intended validation.

    You may refer to the following for some common regular expression for validation:
    LVL 18

    Expert Comment

    by:Rajar Ahmed
    onblur event of textbox can be used for this validation .

    please provide the code which can show us the issue.


    Author Comment


    all I have is the code for the controls, below is a couple of examples of the aspx code:

    <td class="style40" bgcolor="#CCCCCC">
                        <cc2:C1MaskedInput ID="C1AccelerationMax" runat="server" Mask="999,999"
                            Width="50px" />
    <cc3:C1MaskedInput ID="C1NSNA" runat="server" Mask="9999-99-999-9999"
                              style="top: 3px; left: -1px; height: 0.8em; width: 107px" />


    Author Comment

    This control has a Textchanged property, but I do not see an onblur property.
    LVL 83

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now