Click here to Skip to main content
12,952,398 members (36,332 online)
Rate this:
Please Sign up or sign in to vote.
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 21: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 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 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 19-Sep-12 5:22am
ok thanks
Mario Majčica 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
Top Experts
Last 24hrsThis month
OriginalGriff 6,289
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,900

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 19 Sep 2012
Copyright © CodeProject, 1999-2017
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