Victor Charles
asked on
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
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
onblur event of textbox can be used for this validation .
please provide the code which can show us the issue.
Meeran03
please provide the code which can show us the issue.
Meeran03
ASKER
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.
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.
ASKER
This control has a Textchanged property, but I do not see an onblur property.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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