Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript .NET Ajax , +
hi all,
i want to use maskedEditExtender
my Mask is like
Ahmedabad, GJ, 382356, india
Surat, GJ, 323232, india

(city, statecode, zipcode, countryname)
city(upto 25 character)
statecode(two character)
zipcode(six character)
countryname(upto 25 character)

how can i accomplish to set masking in textbox control
please help me
thanks in advance
Posted 18-Sep-12 22:44pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Yes you can, but it is not nice. Separate various info in different boxes.
Still if you are going to do it, consider the following:
1) Mask Characters and Delimiters
9 - Only a numeric character
L - Only a letter
$ - Only a letter or a space
C - Only a custom character (case sensitive)
A - Only a letter or a custom character
N - Only a numeric or custom character
? - Any character
/ - Date separator
: - Time separator
. - Decimal separator
, - Thousand separator
\ - Escape character
{ - Initial delimiter for repetition of masks
} - Final delimiter for repetition of masks
Whit this information, you will be able to create the mask that you need and assign it to Mask property.
You can find more information here:[^]
Hope it helps
PKriyshnA at 19-Sep-12 4:26am
but what about no of character
i mean if user enter surat,ahmedabad then it is valid
not compulsary to add all 25 characters
Mario Majčica at 19-Sep-12 4:28am
As I told you, it is a bad idea to have all this data inputed in a single box. Use multiple textboxes and perform the validation on them.
PKriyshnA at 19-Sep-12 5:22am
ok thanks
Mario Majčica at 19-Sep-12 5:31am
If the answer was useful, don't forget to accept or/and vote it. Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 495
1 Sergey Alexandrovich Kryukov 419
2 OriginalGriff 360
3 CHill60 310
4 CPallini 275
0 Sergey Alexandrovich Kryukov 10,017
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web02 | 2.8.150327.1 | Last Updated 19 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100