[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

Help with validating entries in masked inout box

Hello,

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?

Victor
0
vcharles
Asked:
vcharles
1 Solution
 
teebonCommented:
Hi Victor,

Consider using AjaxControlToolkit:

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx

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

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

http://msdn.microsoft.com/en-us/library/ff650303.aspx
0
 
Rajar AhmedConsultantCommented:
onblur event of textbox can be used for this validation .

please provide the code which can show us the issue.

Meeran03
0
 
vcharlesAuthor Commented:
Hi,

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" />
                </td>
<cc3:C1MaskedInput ID="C1NSNA" runat="server" Mask="9999-99-999-9999"
                          style="top: 3px; left: -1px; height: 0.8em; width: 107px" />

V.
0
 
vcharlesAuthor Commented:
This control has a Textchanged property, but I do not see an onblur property.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now