Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to check This Whole Number ?

How to check This Whole Number ?

Scheduled Pinned Locked Moved C#
helptutorialquestion
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pakpatel
    wrote on last edited by
    #1

    I want User put something like this .... xx123xx here x is Alphabetic word Id has to be 7 char. first 2 char is Alphabetic Last 2 char is alphabetic Middle 3 to 5 char should be number.... Is tha any one can help me.. -Thanks

    Peter

    P H S 3 Replies Last reply
    0
    • P pakpatel

      I want User put something like this .... xx123xx here x is Alphabetic word Id has to be 7 char. first 2 char is Alphabetic Last 2 char is alphabetic Middle 3 to 5 char should be number.... Is tha any one can help me.. -Thanks

      Peter

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      I suggest you do some research on Regular Expressions[^].

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      1 Reply Last reply
      0
      • P pakpatel

        I want User put something like this .... xx123xx here x is Alphabetic word Id has to be 7 char. first 2 char is Alphabetic Last 2 char is alphabetic Middle 3 to 5 char should be number.... Is tha any one can help me.. -Thanks

        Peter

        H Offline
        H Offline
        half life
        wrote on last edited by
        #3

        What exactly to u need? To Validate that the string is in your Format? if so just : use the maskedTextBox and define the MAsk Property to : aa000aa define the MaskInputReject Event it will check the format itself (in the event give a message like "Wrong Format" in a MessageBox)

        Have Fun Never forget it

        G 1 Reply Last reply
        0
        • H half life

          What exactly to u need? To Validate that the string is in your Format? if so just : use the maskedTextBox and define the MAsk Property to : aa000aa define the MaskInputReject Event it will check the format itself (in the event give a message like "Wrong Format" in a MessageBox)

          Have Fun Never forget it

          G Offline
          G Offline
          gspiteri
          wrote on last edited by
          #4

          I find maskedinputs quite buggy imo i think the more elegant solution would be regular expressions

          A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist

          H 1 Reply Last reply
          0
          • G gspiteri

            I find maskedinputs quite buggy imo i think the more elegant solution would be regular expressions

            A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist

            H Offline
            H Offline
            half life
            wrote on last edited by
            #5

            gspiteri wrote:

            I find maskedinputs quite buggy

            Welcome to VS C#, there a Lot of bugs i did what u Thought about it's working fine but i guess u have some other things in between Hope i've been helpfull :):)

            Have Fun Never forget it

            G 1 Reply Last reply
            0
            • H half life

              gspiteri wrote:

              I find maskedinputs quite buggy

              Welcome to VS C#, there a Lot of bugs i did what u Thought about it's working fine but i guess u have some other things in between Hope i've been helpfull :):)

              Have Fun Never forget it

              G Offline
              G Offline
              gspiteri
              wrote on last edited by
              #6

              half-life wrote:

              Welcome to VS C#, there a Lot of bugs

              lol i hear you half-life :)

              A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist

              1 Reply Last reply
              0
              • P pakpatel

                I want User put something like this .... xx123xx here x is Alphabetic word Id has to be 7 char. first 2 char is Alphabetic Last 2 char is alphabetic Middle 3 to 5 char should be number.... Is tha any one can help me.. -Thanks

                Peter

                S Offline
                S Offline
                sarvesh upadhyay
                wrote on last edited by
                #7

                Use Regex for this.You can get many example in c#, javascript just search in google.

                Sarvesh Upadhyay Senior Software Engineer Birlasoft India Ltd. Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups