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. Web Development
  3. ASP.NET
  4. Validation question

Validation question

Scheduled Pinned Locked Moved ASP.NET
tutorialquestionregex
3 Posts 3 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.
  • C Offline
    C Offline
    cheeken2u
    wrote on last edited by
    #1

    i have a textbox need to input amount only, means only can accept digit or double and dot(.) for example, 12 or 12.32 , is it use regular expression validator or rang validator , and how to write the validation expression ?

    Best regards, Chee ken

    M P 2 Replies Last reply
    0
    • C cheeken2u

      i have a textbox need to input amount only, means only can accept digit or double and dot(.) for example, 12 or 12.32 , is it use regular expression validator or rang validator , and how to write the validation expression ?

      Best regards, Chee ken

      M Offline
      M Offline
      Mohsen Sajjadi
      wrote on last edited by
      #2

      hi if you want the user to only enter numerals then you will habe to write your own control derving from textbox which only accepts number and the letters you want and will probably need clientside javascript code to prevent entering of other letters. there are free controls you can use. goto http://www.eworldui.net/[^] and you will find a numericbox cotrol that u can use, hope this helps signature ;P

      1 Reply Last reply
      0
      • C cheeken2u

        i have a textbox need to input amount only, means only can accept digit or double and dot(.) for example, 12 or 12.32 , is it use regular expression validator or rang validator , and how to write the validation expression ?

        Best regards, Chee ken

        P Offline
        P Offline
        playout
        wrote on last edited by
        #3

        If you only want to validate the input eg "12", "12.32", "128.25", etc, etc... You can use the Range validator, and set the Type to "Currency" and the operator to "DataTypeCheck"

        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