Results 1 to 2 of 2

Thread: Formatted Input

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2003
    Posts
    71

    Formatted Input

    What is the accepted way to get formatted data such as phone numbers and postal codes into .Net? I can see how to use regular expressions to validate input, but is it still accepted practice to put masking characters in place for area codes, dashes for zip plus 4, etc? Or are most applications just using a blank text field and validating whatever is typed in?

    I know that VB6 used the masked edit control, and I know that it can be added into a NET project, but I'm guessing that is for backward compatability.

    I've checked three text books and while they all cover some pretty dense stuff, they all skip over this pretty basic subject.



  2. #2
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    For all my field validationin C#, i've used Perl5 regular expressions to restrict the user into only being able to type in allowed characters such as numbers, or alpha's etc..

    But for particular formats I suppose you would need to create a masked control (I tend not to use older vb controls, but add functionlity to existing ones)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width