I need to format an asp.net text box in such a way that it accepts the user input only in the form of
### - ### - ###
(#:numerics only).
Suggestions or answers please.
I need to format an asp.net text box in such a way that it accepts the user input only in the form of
### - ### - ###
(#:numerics only).
Suggestions or answers please.
MaskedEdit might be what you're looking for.
Here is an modified example from the link above:
<ajaxToolkit:MaskedEditExtender
TargetControlID="TextBox2"
Mask="999-999-9999" />
use jquery masked text box Masked Input Plugin 1.2.2
You can use MaskedEdit ajax control..
MaskedEdit is an ASP.NET AJAX extender that attaches to a TextBox control to restrict the kind of text that can be entered. MaskedEdit applies a "mask" to the input that permits only certain types of characters/text to be entered. The supported data formats are: Number, Date, Time, and DateTime.
follow this link for details: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx
You can either use jQuery as suggested by DeveloperX or use the MaskedEditExtender from AjaxControlToolkit.